windows 系统中 apache 2.2.22 开启访问权限

学习笔记 马富天 2017-10-16 09:33:39 93 1

【摘要】apache 2.2.22 版本和 apache 2.4.9 版本的配置文件是不同的,如何分别开启它们的访问权限在开发过程中是非常常见的一个问题,本文这里记录一下如何在 apache 2.2.22 版本下开启访问权限。

apache 2.2.22 版本的配置文件是:httpd.conf,默认情况是只允许本地 IP 去访问的,即 127.0.0.1 或者 localhost,若要用局域网、或者外网去访问,则需要修改它的配置文件。

打开配置文件,找到其中的这段:

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

然后将上面的 "Allow from 127.0.0.1" 改成 "Allow from all",修改后保存并关闭文件,重启 apache 服务器后即开启对所有外网 IP 的访问权限。

  1. Order Deny,Allow
  2. Deny from all
  3. Allow from all
请输入图片名称

很简单只需要改动这一个地方就行。

版权归 马富天个人博客 所有

本文标题:《windows 系统中 apache 2.2.22 开启访问权限》

本文链接地址:http://www.mafutian.com/333.html

转载请务必注明出处,小生将不胜感激,谢谢! 喜欢本文或觉得本文对您有帮助,请分享给您的朋友 ^_^

1

0

上一篇《 推荐一种 windows 系统下非常好用的文件夹加密锁 》 下一篇《 windows 系统如何扩充系统盘(C盘)的大小 》

所有评论

  1. 首页
  2. 上一页
  3. 1
  4. 下一页
  5. 尾页
  6. 第1页
  7. 每页12条
  8. 共1页
  9. 共1条
评论审核未开启
表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情 表情
验证码

TOP10

  • 浏览最多
  • 评论最多