127.0.0.1 www.localhost.com 127.0.0.1 www.frontend.com 127.0.0.1 www.backend.com
<VirtualHost *:80> ServerAdmin frontend.com DocumentRoot "D:wampwwwadvancedfrontendweb" ServerName www.frontend.com ErrorLog "logs/frontend.com.error.log" CustomLog "logs/frontend.com.error.access.log" common </VirtualHost> <VirtualHost *:80> ServerAdmin backend.com DocumentRoot "D:wampwwwadvancedackendweb" ServerName www.backend.com ErrorLog "logs/backend.com.error.log" CustomLog "logs/backend.com.error.access.log" common </VirtualHost> <VirtualHost *:80> ServerAdmin localhost.com DocumentRoot "D:wampwww" ServerName www.localhost.com ErrorLog "logs/localhost.com.error.log" CustomLog "logs/localhost.com.error.access.log" common </VirtualHost>
开启 Include conf/extra/httpd-vhosts.conf
开启IncludeOptional "D:/wamp/vhosts/*"