wamp配置虚拟主机

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:\wamp\www\advanced\frontend\web"
    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:\wamp\www\advanced\backend\web"
    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:\wamp\www"
    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/*"

 

posted @ 2016-05-24 18:41  雨落知音  阅读(137)  评论(0编辑  收藏  举报