WAMP配置httpd.conf允许外部访问

一、httpd.conf文件更改

1、找到httpd.conf文件位置:

在你的wamp安装目录下的\bin\apache\apache2.4.9\conf文件夹中。例如路径为:C:\wamp\bin\apache\apache2.4.9\conf

2、httpd.conf代码更改

①在第242行左右的位置将

  1. <Directory />  
  2.     AllowOverride none  
  3.     Require all denied  
  4. </Directory>  

更改为:

  1. <Directory />  
  2.     AllowOverride none  
  3.     #Require all denied  
  4.     Require all granted  
  5. </Directory>  

也就是允许其他请求访问。

②在第284行左右的位置在“Require local”后面加上一句:“Require all granted”

  1. <Directory "c:/wamp/www/">  
  2.     #  
  3.     # Possible values for the Options directive are "None", "All",  
  4.     # or any combination of:  
  5.     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews  
  6.     #  
  7.     # Note that "MultiViews" must be named *explicitly* --- "Options All"  
  8.     # doesn't give it to you.  
  9.     #  
  10.     # The Options directive is both complicated and important.  Please see  
  11.     # http://httpd.apache.org/docs/2.4/mod/core.html#options  
  12.     # for more information.  
  13.     #  
  14.     Options Indexes FollowSymLinks  
  15.   
  16.     #  
  17.     # AllowOverride controls what directives may be placed in .htaccess files.  
  18.     # It can be "All", "None", or any combination of the keywords:  
  19.     #   AllowOverride FileInfo AuthConfig Limit  
  20.     #  
  21.     AllowOverride all  
  22.   
  23.     #  
  24.     # Controls who can get stuff from this server.  
  25.     #  
  26.   
  27. #   onlineoffline tag - don't remove  
  28.     Require local  
  29.     Require all granted  
  30. </Directory> 
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值