LINUX.ORG.RU
ФорумAdmin

Apache 2. Домен использует другой хост

 


0

1

Всем привет. Настраиваю Apahce 2 сервер. Создал конфиг-хост, на основе 000-default.conf и переименовал в доменное имя. т.е. my-site.ru.conf Содержание

<VirtualHost *:80>
        ServerName opencase-csgo.ru
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/opencase-csgo.ru/public_html
</VirtualHost>
Создал каталоги для сайта.

Сделал сайт доступным, Перезагрузил сервер. захожу по доменному имени my-site.ru и вижу стандартную страницу apache2, которую использует конфиг 000-default.conf т.е. /var/www/html

Переделывал 1000 раз. Гуглил. ничего не нашел. решил спросить у вас совета.



Последнее исправление: beastie (всего исправлений: 1)

Ответ на: комментарий от SevikL

ошибок нету. ни в логах, ни в консоле

jallvar
() автор топика

зачем ты в ServerName пишешь opencase-csgo.ru, а ходишь на my-site.ru?

a2ensite my-site.ru.conf && service apache restart спасет тебя

SevikL ★★★★★
()
Ответ на: комментарий от SevikL

еще раз пишу. делал. не работает. все равно, ссылается на стандартный конфиг. в хостах пишет, что opencase-csgo.ru работает

jallvar
() автор топика
Ответ на: комментарий от SevikL

1 - 000-default.conf opencase-csgo.ru.conf 2 - вызвался файл хоста 3 - 20 записей о get ответе, ресурсов дефолтной папки

jallvar
() автор топика
Ответ на: комментарий от SevikL

<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName http://www.example.com

ServerName opencase-csgo.ru ServerAdmin webmaster@localhost DocumentRoot /var/www/opencase-csgo.ru/public_html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with «a2disconf». #Include conf-available/serve-cgi-bin.conf </VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet root@opencase-csgo:~# clear root@opencase-csgo:~# tail -n 20 /var/log/apache2/access.log 178.163.94.30 - - [22/Dec/2015:14:31:51 +0300] «GET / HTTP/1.1» 200 3593 "-" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:31:51 +0300] «GET /icons/ubuntu-logo.png HTTP/1.1» 304 179 "http://opencase-csgo.ru/" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:31:52 +0300] «GET / HTTP/1.1» 200 3593 "-" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:31:52 +0300] «GET /icons/ubuntu-logo.png HTTP/1.1» 304 179 "http://opencase-csgo.ru/" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» ::1 - - [22/Dec/2015:14:38:12 +0300] «OPTIONS * HTTP/1.0» 200 125 "-" «Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 (internal dummy connection)» ::1 - - [22/Dec/2015:14:38:12 +0300] «OPTIONS * HTTP/1.0» 200 125 "-" «Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 (internal dummy connection)» ::1 - - [22/Dec/2015:14:38:12 +0300] «OPTIONS * HTTP/1.0» 200 125 "-" «Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 (internal dummy connection)» ::1 - - [22/Dec/2015:14:38:12 +0300] «OPTIONS * HTTP/1.0» 200 125 "-" «Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 (internal dummy connection)» ::1 - - [22/Dec/2015:14:38:12 +0300] «OPTIONS * HTTP/1.0» 200 125 "-" «Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 (internal dummy connection)» ::1 - - [22/Dec/2015:14:38:12 +0300] «OPTIONS * HTTP/1.0» 200 125 "-" «Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 (internal dummy connection)» 178.163.94.30 - - [22/Dec/2015:14:38:19 +0300] «GET / HTTP/1.1» 200 3594 "-" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:38:19 +0300] «GET /icons/ubuntu-logo.png HTTP/1.1» 304 179 "http://opencase-csgo.ru/" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:38:20 +0300] «GET / HTTP/1.1» 200 3593 "-" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:38:20 +0300] «GET /icons/ubuntu-logo.png HTTP/1.1» 304 179 "http://opencase-csgo.ru/" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:38:21 +0300] «GET / HTTP/1.1» 200 3593 "-" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:38:21 +0300] «GET /icons/ubuntu-logo.png HTTP/1.1» 304 179 "http://opencase-csgo.ru/" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:38:21 +0300] «GET / HTTP/1.1» 200 3593 "-" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:38:21 +0300] «GET /icons/ubuntu-logo.png HTTP/1.1» 304 179 "http://opencase-csgo.ru/" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:48:06 +0300] «GET / HTTP/1.1» 200 3594 "-" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» 178.163.94.30 - - [22/Dec/2015:14:48:06 +0300] «GET /icons/ubuntu-logo.png HTTP/1.1» 304 179 "http://opencase-csgo.ru/" «Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 YaBrowser/15.10.2454.3865 Safari/537.36» root@opencase-csgo:~#

jallvar
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.