【PHP編程之路
概述
設置apache虛擬目錄
1.開啟“虛擬目錄配置文件”httpd-vhosts.conf
文件路徑:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf
將以下配置:
- # Virtual hosts
- # Include conf/extra/httpd-vhosts.conf
改為:
- # Virtual hosts
- Include conf/extra/httpd-vhosts.conf
2.設置虛擬目錄可訪問
文件路徑:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf
將以下配置:
- <Directory />
- AllowOverride none
- Require all denied
- </Directory>
改為:
- <Directory />
- AllowOverride none
- </Directory>
3.添加虛擬目錄
文件路徑:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf
添加虛擬目錄
- <VirtualHost *:80>
- ServerAdmin [email protected]
4.重啟apache
5.在瀏覽器中輸入web.shop.com
【PHP編程之路