LINUX.ORG.RU
ФорумAdmin

apache 2.4.7 и virtualHost, как теперь Document Roots настраивать?

 


0

1
uname -a
Linux commeta-P5K 3.13.0-43-generic

apache2 -v
Server version: Apache/2.4.7 (Ubuntu)

grep ^[^#] apache2.conf 
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all denied
</Directory>
<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>
<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf

Поставил ubuntu 14.04 а там новый апач, создаю как обычно

<Directory /var/www/mysite.ru/www>
		Options Indexes -ExecCGI -Includes
		php_admin_flag engine on
		AllowOverride None
		Require all granted
</Directory>
<VirtualHost *:81>
		ServerName mysite.ru
		AddDefaultCharset UTF-8
		CustomLog /var/www/mysite.ru/mysite.ru.access.log combined
		DocumentRoot /var/www/mysite.ru/www
		ErrorLog /var/www/mysite.ru/mysite.ru.error.log
		ServerAdmin webmaster@mysite.ru
		ServerAlias www.mysite.ru
		AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
		AddType application/x-httpd-php-source .phps
		php_admin_value upload_tmp_dir /var/www/mysite.ru/tmp
		php_admin_value session.save_path /var/www/mysite.ru/tmp
</VirtualHost>
и в /etc/hosts > mysite.ru соответственно, в каталоге /var/www/mysite.ru/www файлы сайта, но через браузер Apache2 Ubuntu Default Page открывается, ЧЯДНТ?

tail -n 1 access.log 
192.168.0.5 - - [19/Jan/2015:20:44:45 +0300] "GET / HTTP/1.1" 200 3594 "-" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:35.0) Gecko/20100101 Firefox/35.0"

tail -n 1 error.log

?

iron ★★★★★
()

твой виртуалхост висит на 81 порту. ты соединяешься на 80й. скорее всего подразумевалось, что на 80 порту будет висеть nginx и проксировать запросы апачу. или меняй порт vhost-а на 80, или настраивай nginx.

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

да разумеется что http://mysite.ru:81 и на 80-м nginx с ним то все впорядке, по обоим портам картина одинаковая.

tail -n 2 error.log
[Wed Jan 21 02:44:17.866230 2015] [mpm_prefork:notice] [pid 1719] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.5 configured -- resuming normal operations
[Wed Jan 21 02:44:17.866457 2015] [core:notice] [pid 1719] AH00094: Command line: '/usr/sbin/apache2'

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