安裝完wamp以後,安裝網上的教程設置虛擬路徑,出現了問題,一樣的問題由不一樣的緣由致使。web
一、httpd.conf中添加Listen 相應的端口,個人是8080ide
二、httpd.conf去掉Include conf/extra/httpd-vhosts.conf前面的#。this
三、而後調用localhost,就出現下面的錯誤:spa
Forbidden
You don't have permission to access /on this server.
解決方法:在conf\extra下面的httpd-vhosts.conf文件中添加,code
注意:虛擬目錄中也要寫一下目錄的訪問權限,下面藍色部分server
<VirtualHost *:8080> DocumentRoot D:/wamp/www/web ServerName localhost <Directory "d:/wamp/www/aa"> Options Indexes FollowSymLinks Order allow,deny Allow from all AllowOverride All </Directory> </VirtualHost>
六、localhost運行好使了,但運行localhost:8080卻有新的問題:blog
Forbidden
You don't have permission to access /on this server.
七、而後也是找了不少,可能是說什麼allow from all等等的問題。但不管我怎麼設置都是這個問題。教程
最後,發現把Options Indexes FollowSymLinks 後面添加上 ExecCGI就好使了。
io
<VirtualHost *:8080> DocumentRoot D:/wamp/www/aa ServerName localhost <Directory "d:/wamp/www/aa"> Options Indexes FollowSymLinks ExecCGI Order allow,deny Allow from all AllowOverride All </Directory> </VirtualHost>