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/*"
相關文章
相關標籤/搜索