WAMP配置httpd.conf允许外部访问
2016-02-03 09:39
751 查看
在电脑上开启Apache服务后,如何让外部网络访问呢?
在网上查找答案和问过一些小伙伴后,得到以以下方案。大致是在httpd.conf中加入一些语句以及利用自己的WiFi建立热点,让需要访问的设备连接上。
一、httpd.conf文件更改
1、找到httpd.conf文件位置:
在你的wamp安装目录下的\bin\apache\apache2.4.9\conf文件夹中。此台电脑上我的文件路径为:C:\wamp\bin\apache\apache2.4.9\conf
2、httpd.conf代码更改
①在第240行左右的位置将
更改为:
也就是允许其他请求访问。
②在第280行左右的位置在“Require local”后面加上一句:“Require all granted”
即
二、建立WiFi热点,让希望访问本机服务的设备连接
三、关闭本机防火墙
四、通过ipconfig查看本机的ipv4地址
这时候我们就可以访问利用其他设备访问本机的IP地址了~
在网上查找答案和问过一些小伙伴后,得到以以下方案。大致是在httpd.conf中加入一些语句以及利用自己的WiFi建立热点,让需要访问的设备连接上。
一、httpd.conf文件更改
1、找到httpd.conf文件位置:
在你的wamp安装目录下的\bin\apache\apache2.4.9\conf文件夹中。此台电脑上我的文件路径为:C:\wamp\bin\apache\apache2.4.9\conf
2、httpd.conf代码更改
①在第240行左右的位置将
<Directory /> AllowOverride none Require all denied </Directory>
更改为:
<Directory /> AllowOverride none #Require all denied Require all granted </Directory>
也就是允许其他请求访问。
②在第280行左右的位置在“Require local”后面加上一句:“Require all granted”
即
<Directory "c:/wamp/www/"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride all # # Controls who can get stuff from this server. # # onlineoffline tag - don't remove Require local Require all granted </Directory>
二、建立WiFi热点,让希望访问本机服务的设备连接
三、关闭本机防火墙
四、通过ipconfig查看本机的ipv4地址
这时候我们就可以访问利用其他设备访问本机的IP地址了~
相关文章推荐
- IIS虚拟目录实现与文件服务器网络驱动器映射共享
- 使用Reachability类判断iOS设备的当前网络连接类型
- http错误代码含义大全详解
- 2016太原网络营销师郭文军剖析支付宝#集褔#的原因
- 【AJAX】——XMLHttpRequest对象
- xp系统下网络打印机怎么设置
- 构建LAMP平台(三)(软件版本:httpd-2.4.16,php-5.6.12,mysql-5.6.26)
- Android实现网络多线程断点续传下载
- 解决Win10服务主机本地系统网络受限
- Android 本地加载网页与显示网络图片
- 阿里再次打响社交网络之战?
- 给服务器免费的ssl证书 http和https共存
- 厦门巨游网络科技有限公司(HOTPOWER)承接游戏UI外包
- 计算机网络3--计算机网络结构
- 解密:华为的敏捷网络是SDN吗
- Python 第十四章 网络编程
- 线性规划与网络流24题 1.飞行员配对方案问题(nefu 475)
- GitLab配置HTTPS
- 网络流 最大流 ISAP算法
- 网络流 ISAP算法