文件:httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/"
ServerName localhost
Alias /server J:/server/
<Directory "J:/server/guagua/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
<Directory "J:/server/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog "c:/wamp/logs/apache_error.log"
CustomLog "c:/wamp/logs/access.log" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "J:/server/guagua/"
ServerName www.guagua.com
Alias /server J:/server/
<Directory "J:/server/guagua/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
<Directory "J:/server/">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog "J:/server/guagua/error.log"
CustomLog "J:/server/guagua/common.log" common
</VirtualHost>
文件:httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
文件hosts
127.0.0.1 localhost
127.0.0.1 www.guagua.com