我正在用php进行开发,我的后端是mysql,在windows 7机器上。我已经安装了xampp服务器,并且使用Apache2.4作为web服务器。我有一个mtnl路由器,我所有的设备都连接到它。我想访问我的android智能手机上htdocs文件夹中的所有内容。我看到了一些关于编辑httpd.conf文件的帖子,但是没有用。请指定在conf文件中编辑什么。
提前感谢!
我的ip-config o/p是:
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix:
Link-local IPv6 Address: fe80::853e:7ced:1b5e:91cc%12
IPv4 Address: 192.168.1.103
Subnet Mask : 255.255.255.0
Default Gateway:192.168.1.1我的httpd.conf文件ka编辑如下:
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 :: 192.168.1
Allow from 127.0.0.1
Allow from 192.168.1
**SOLUTION FOUND:**正如#BenH说的那样,我们必须编辑httpd.conf,就像他展示的那样
Goto防火墙并将apache服务器添加到异常列表
若要设置静态ip,转到网络、共享和打开适配器设置,
选择当前连接的适配器,右键单击并单击属性
单击ipv4属性,单击使用以下ip地址
您的ip地址: 192.168.1.xyz
xyz可以是从02到255之间的任何东西。
子网掩码:255.255.255.0
默认网关: 192.168.1.1
mtnl在孟买的首选dns服务器是:59.185.0.23
alt:203.94.227.70单击确定
重新启动apache
感谢大家,特别是BenH帮助我:)
发布于 2014-02-08 13:29:26
为本地网络上的每个设备设置静态IP。然后,您必须配置apache以允许从所有(而不仅仅是127.0.0.1 )连接,它应该在httpd.conf中:
AllowOverride All
Order Deny,Allow
Deny from all
Allow from allhttps://stackoverflow.com/questions/21646268
复制相似问题