<VirtualHost *:80>
DocumentRoot "E:\PHPER\btc_biying_www\public"
ServerName by.cn
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
<Directory "E:\PHPER\btc_biying_www\public">
AllowOverride All
Options Indexes FollowSymLinks Includes ExecCGI
Require all granted
Allow from all
</Directory>
</VirtualHost>
1、查找httpd.conf中查找deny from all 替换为 Allow from all
2、检查Directory路径和DocumentRoot是否一致
3、Options参数Indexes FollowSymLinks Includes ExecCGI(如果是phpStudy环境都加上)
4、如果是Linux环境注意权限问题
原文地址:http://jinliang.blog.51cto.com/8981814/1869365