安装了WAMP之后,Apache始终无法在局域网其它电脑上访问。一番摸索,Apache 2.4与Apache2.2的配置有所不同。
在WAMP的Apache配置中,不需要修改httpd.conf,只需要修改httpd-vhosts.conf,将其中的"Require local"改为"Require all granted"即可,如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| # Virtual Hosts #
<VirtualHost *:80> ServerName localhost DocumentRoot D:/wamp64/www <Directory "D:/wamp64/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All #Require local 注释这行 Require all granted #添加这行即可 </Directory> </VirtualHost> #
|