本地配置的虚拟机都无法访问,在error日志中,有client denied by server configuration字样。

原因是虚拟机配置的问题:

有问题的配置:


<Directory "E:/www/doc">
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>

正确的配置:


<Directory "E:/www/doc">
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

但是很奇怪的是,我本机也是Apache2.4,使用的第一种配置,没有问题,很正常。


可以参考:

https://blog.csdn.net/forest_fire/article/details/86689143