在xampp新增了一個virtualhost:
<VirtualHost 127.0.0.11:80> DocumentRoot E:/workspacePHP/personalSite ServerName 127.0.0.11:80 </VirtualHost> <Directory "E:/workspacePHP/personalSite"> Options Indexes FollowSymLinks AllowOverride All Order Allow,Deny Allow from all </Directory>
然後訪問http://127.0.0.11:80,出現403禁止訪問錯誤,google之後發現httpd.conf文件有默認的配置,
<Directory "D:/xampp/cgi-bin"> AllowOverride All Options None Require all denied </Directory>
修改require爲all granted即可。
<Directory "D:/xampp/cgi-bin"> AllowOverride All Options None Require all granted </Directory>
或者在新增的Directory增加require all granted:
<Directory "E:/workspacePHP/personalSite"> Options Indexes FollowSymLinks AllowOverride All Order Allow,Deny Allow from all Require all granted </Directory>
遇到的問題,此處mark一下。