具體方法如下:
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>
<VirtualHost *:80> ServerAdmin webmaster@web.shop.com DocumentRoot "D:/_HelloWorld/01_MyProjects/06_PHP/01_Web/Product/Source/Shop" ServerName web.shop.com ErrorLog "logs/web.shop.com-error.log" CustomLog "logs/web.shop.com-access.log" common </VirtualHost>
以上是如何設定apache虛擬目錄的詳細內容。更多資訊請關注PHP中文網其他相關文章!