[英]Can't Access wamp server (localhost) on my android device again
1 I am developing a responsive website and i want to check it on my android devices (mobile, tablet). 1我正在开发一个响应式网站,我想在我的android设备(移动设备,平板电脑)上对其进行检查。 I am trying to access my server in the mobile browser's window using my ip (192.168.1.100). 我试图使用IP(192.168.1.100)在移动浏览器的窗口中访问服务器。 I have tried various methods discussed here like access-localhost-from-mobile-phone 我尝试了这里讨论的各种方法,例如access-localhost-from-mobile-phone
I have also edited my apache config file as suggested but nothing working. 我还按照建议编辑了apache配置文件,但没有任何效果。 No matter what i do, i get Forbidden, you don't have permission to access / on this server. 不管我做什么,我都会被禁止,您没有访问此服务器上的权限。 I am running apache 2.4 我正在运行Apache 2.4
I have also tried 我也尝试过
<Directory />
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
then 然后
<Directory />
Options FollowSymLinks
AllowOverride All
Require ip 255.255.255 (my subnet)
</Directory>
then 然后
<Directory />
Options FollowSymLinks
AllowOverride All
Require ip 192.168.1.100(my IPv4)
</Directory>
then AllowOverride none Require all denied then 然后AllowOverride none不需要全部拒绝
<Directory />
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Nothing works for me... 什么都不适合我...
For future purposes if anyone finds this thread. 为了将来的目的,如果有人找到此线程。 This is how to do it for apache 2.4.* 这是针对Apache 2.4。*的方法
go to your path to root folder of wamp\\bin\\apache\\apache2.4.23\\conf\\extra 转到您的路径wamp \\ bin \\ apache \\ apache2.4.23 \\ conf \\ extra的根文件夹
Open te file : httpd-vhosts.conf 打开文件:httpd-vhosts.conf
edit this line : Require local 编辑此行:需要本地
to : Require all granted 到: 要求所有被授予
Now make a hotspot on your phone or tablet. 现在在手机或平板电脑上建立热点。 Connect the laptop/pc to ur hotspot and type /ipconfig in cmd on your laptop/pc. 将笔记本电脑/ PC连接到您的热点,然后在笔记本电脑/ PC上的cmd中键入/ ipconfig。 Now go to your phone and type in the ipv4 address given in the cmd. 现在转到您的电话,然后输入cmd中提供的ipv4地址。 Now you can acces your localhost. 现在,您可以访问您的本地主机。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.