如何允许远程访问我的WAMP Server for Mobile(Android) [英] How to allow remote access to my WAMP server for Mobile(Android)

查看:70
本文介绍了如何允许远程访问我的WAMP Server for Mobile(Android)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用PHP和jQuery创建了一个用于移动设备的网站.它可以在我的PC上运行,但现在我想在Android设备上对其进行测试.我该怎么办?

I have created a website for mobile using PHP and jQuery. It works on my PC but now I want to test it with my Android device. How can I do that?

如何从我的Android设备访问WAMP服务器的IP?

How can I access a WAMP server's IP from my Android device?

我的手机和PC连接在同一路由器内.我应该直接连接到我的PC还是可以通过路由器进行连接?

My mobile and PC are connected within the same router. Should I directly connect to my PC or can I do that through the router?

我进行了搜索,发现我必须更改phpmyadmin.conf中的权限,但仍然无法正常工作.有什么主意为什么行不通?

I have searched about it and found that I have to change permissions in phpmyadmin.conf but still it does not work. Any ideas why doesn't it work?

我的httpd.config具有类似的内容.

My httpd.config has something like this.

<Directory />
    Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 192.168.0.104
</Directory>

192.168.0.104是我的android设备的IP.

192.168.0.104 is my android device's IP.

推荐答案

我假设您正在使用Windows.打开命令提示符,然后键入ipconfig并找到您的本地地址(在您的PC上),它的外观应类似于192.168.1.13192.168.0.5,其中结尾数字是变化的数字.它应该在IPv4地址旁边.

I assume you are using windows. Open the command prompt and type ipconfig and find out your local address (on your pc) it should look something like 192.168.1.13 or 192.168.0.5 where the end digit is the one that changes. It should be next to IPv4 Address.

如果WAMP不使用虚拟主机,则下一步是在电话浏览器中输入该IP地址,即http://192.168.1.13如果您有虚拟主机,则需要root用户才能编辑主机文件.

If your WAMP does not use virtual hosts the next step is to enter that IP address on your phones browser ie http://192.168.1.13 If you have a virtual host then you will need root to edit the hosts file.

如果要测试网站的响应能力/移动设备设计,可以在chrome或其他浏览器中更改用户代理以模仿移动设备.

If you want to test the responsiveness / mobile design of your website you can change your user agent in chrome or other browsers to mimic a mobile.

请参见 http://googlesystem.blogspot.co.uk/2011/12/changing-user-agent-new-google-chrome.html .

Chrome开发人员工具现在具有移动调试工具,您可以在其中更改视口的大小,欺骗用户代理,连接(4G,3G等).

Chrome dev tools now has a mobile debug tool where you can change the size of the viewport, spoof user agents, connections (4G, 3G etc).

如果您被禁止访问,请参阅以下问题

If you get forbidden access then see this question WAMP error: Forbidden You don't have permission to access /phpmyadmin/ on this server. Basically, change the occurrances of deny,allow to allow,deny in the httpd.conf file. You can access this by the WAMP menu.

要立即消除此问题的可能原因,请将您的配置文件设置为

To eliminate possible causes of the issue for now set your config file to

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    <RequireAll>
        Require all granted
    </RequireAll>
</Directory>

因为那在我的Windows PC上正常工作,所以如果您还有目录配置块,也请进行更改以允许全部使用.

As thatis working for my windows PC, if you have the directory config block as well change that also to allow all.

解决问题的配置文件:

https://gist.github.com/samvaughton/6790739

问题是/www apache目录配置块仍然将deny设置为默认值,并且只能从localhost允许.

Problem was that the /www apache directory config block still had deny set as default and only allowed from localhost.

这篇关于如何允许远程访问我的WAMP Server for Mobile(Android)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆