wamp2.5 设置允许外网访问

发布时间 2023-04-25 14:50:46作者: 海乐学习

装了wamp,发现通过外部网络无法访问本机的apache。

在 httpd.conf 文件中

apache2.2 及之前版本

加入语句  Allow from all

apache2.4 之后的版本

加入语句  Require all granted

 

2.2 的configuration:

Order deny,allow

Deny from all

2.4 及之后的configuration:

Require all denied (对应2.2的Deny from all)

Require all granted (对应2.2的Allow from all)

 

以 wamp 2.5 为例 正确的配置方法是:

打开..\wamp\bin\apache\apache2.4.9\conf 文件夹,用记事本编辑里面的文件 httpd.conf

找到  <Directory "d:/wamp/www/">

在 Require all granted 下面, 添加一行 Require all granted ,保存,然后重启 wamp 服务,即可。