我已经使用 PuPHPet (Vagrant-Puppet-PHP) 设置了一个虚拟主机显然 PuPHPet 使用此配置为我创建了一个默认站点10-default_vhost_80.conf
<VirtualHost *:80>
ServerName default
## Vhost docroot
DocumentRoot "/var/www/html"
## Directories, there should at least be a declaration for /var/www/html
<Directory "/var/www/html">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
</Directory>
## Logging
ErrorLog "/var/log/apache2/default_vhost_80_error.log"
ServerSignature Off
CustomLog "/var/log/apache2/default_vhost_80_access.log" combined
</VirtualHost>
我已经创建了这个站点配置site_dev.conf
<VirtualHost *:80>
ServerName site.dev
## Vhost docroot
DocumentRoot "/var/www/web"
## Directories, there should at least be a declaration for /var/www/web
<Directory "/var/www/web">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
</Directory>
## Logging
ErrorLog "/var/log/apache2/av_0rjxvm6sfxhm_error.log"
ServerSignature Off
CustomLog "/var/log/apache2/av_0rjxvm6sfxhm_access.log" combined
## Server aliases
ServerAlias www.site.dev
## SetEnv/SetEnvIf for environment variables
SetEnv APP_ENV dev
</VirtualHost>
默认配置是apache2.conf
ServerName "local.puphpet"
ServerRoot "/etc/apache2"
PidFile ${APACHE_PID_FILE}
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
User www-data
Group www-data
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
HostnameLookups Off
ErrorLog "/var/log/apache2/error.log"
LogLevel warn
EnableSendfile Off
#Listen 80
Include "/etc/apache2/mods-enabled/*.load"
Include "/etc/apache2/mods-enabled/*.conf"
Include "/etc/apache2/ports.conf"
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional "/etc/apache2/conf.d/*.conf"
IncludeOptional "/etc/apache2/sites-enabled/*"
我已经禁用10-default_vhost_80
并重新加载了 apache,但是我的 DocumentRoot 仍然指向/var/www/html/
我是否遗漏了什么?