如何将我的 WAMP 放到网上以供他人访问?
我想简单地打开我的计算机,让我的业务合作伙伴看到我在本地主机上开发的内容。我知道这可能存在一些安全问题,但我只想打开我的计算机几分钟。
我需要在以下接口上设置什么才能执行此操作?
- 我的无线路由器
- windows7
- WAMP
I would like to briefly open up my computer and allow my business partener to see what I've been developing on the my localhost. I understand there are probably some security issues with this but I only want to open up my computer for a few minutes.
What do I need to setup on the following interfaces to do this?
- my wireless router
- windows7
- WAMP
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
这对于我在 WinXP 上来说非常容易。
ipconfig /all
- 获取您的本地 IP 地址This works very easily for me on WinXP.
ipconfig /all
- get your local IP address另一种选择是简单地使用隧道服务,例如:
Localtunnel 是开源的,而其他的则要求您在试用期后每月支付少量费用。
Another option is simply using a tunnelling service like:
Localtunnel is open source, while the others require you to pay a small monthly fee after a trial period.
要允许外部连接到您的服务器,您必须以在线模式重新启动 WAMP。
左键单击 WAMP 图标并选择联机。
等待图标状态再次变为白色。
在网络浏览器栏中输入您的 IP,然后按 Enter 键。
如果您得到与以前相同的禁止页面,请按 F5 让浏览器加载最新版本。
如果仍然无法正常工作,您可能需要在路由器配置中启用端口 80 转发。
你的好友终于可以看到你的主页了!
To allow external connections to your server you have to restart WAMP in online mode.
Left-click the WAMP icon and select Put Online.
Wait for the icon status to change to white again.
Enter your IP into your web browser bar and hit enter.
If you get the same forbidden page as before hit F5 to let the browser load the newest version.
If it's still not working you probably have to enable port 80 forwarding in your router configuration.
Finally your buddy can see your homepage!
如果您的 Apache 服务器已在本地主机上启动并运行,那么您应该能够在路由器内设置一条路由,以指向您的计算机以获取端口 80 上传入的流量。
编辑:我刚刚检查了我的路由器设置,并且它称之为“服务”。它允许侦听特定端口上的传入请求,并将请求转发到连接到路由器的特定计算机(通过 IP)。
你最好在 superuser.com 上问这个问题
If your Apache server is up and running already on your localhost, then you should just be able to set up a route within your router to point at your computer for traffic coming IN on port 80.
EDIT: I just checked my router settings, and it calls this 'services'. It allows incoming requests on a specific port to be listened to, and forwards the request onto a specific computer (by IP) attached to the router.
You would be better asking this question on superuser.com
向您的外部 IP 端口 80 发送至您的内部 IP 端口 80 的传入请求 - 此处的视频演示
incoming requests to your External IP port 80 towards your Internal IP port 80 - video demo here
有多种因素(实际 WAMP 服务器之外)都会阻止来自外部(例如,来自互联网)的请求到达正在运行的 Apache 服务器。
首先,您需要确保您有一个静态 IP 地址,并且最好还有一个注册域名,并且为该 IP 地址设置了“A”记录 (DNS) - 对于
ServerName
和所有VirtualHost 中使用的ServerAlias
主机(即“www”)。否则,如果您有动态 IP 地址,请使用动态 DNS 客户端将更改的 IP 地址与域名的 DNS 记录同步。
然后:
您需要打开 Windows 防火墙以允许传入端口 80 (http) 和端口 443 (https) TCP 数据包。
您需要将路由器(您的 WiFi 盒子)中的端口 80 和 443“端口转发”到服务器的 LAN IP。
您需要检查您的 ISP 是否阻止传入端口 80(和 443)请求。如果是,您需要更改此 VirtualHost 正在侦听\绑定的端口。您可以使用外部代理网站并输入
http://your.public.ip.address/
作为要访问的 URL 来进行此测试。如果请求超时,则它永远不会通过。然后,当您更改 VirtualHost 的端口时,请使用 URLhttp://your.public.ip.address:port/
再次测试(尝试端口 8080)。摘自启用网站的 Internet 访问(适用于 WAMP 服务器)
There are multiple factors (outside of the actual WAMP server) that will all prevent requests coming in from outside (e.g., from the internet) from reaching the running Apache server.
First, you need to make sure you have a static IP address, and preferably also a registered domain name with an "A" record (DNS) set to that IP address - for both the
ServerName
and all theServerAlias
hosts (i.e., 'www') that are used in the VirtualHost.Otherwise, if you have a dynamic IP address, use a Dynamic DNS client to sync the changing IP address with the domain name's DNS records.
Then:
You'll need to open Windows Firewall to allow incoming port 80 (http) and port 443 (https) TCP packets.
You'll need to "port-forward" ports 80 and 443 in the Router (your WiFi box) to the LAN IP of the server.
You'll need to check if your ISP is blocking incoming port 80 (and 443) requests. If it is, you'll need to change the port this VirtualHost is listening-on\binding-to. You can make this test by using an outside proxy website and entering
http://your.public.ip.address/
for the URL to visit. If the request times out, it never made it through. Afterwards, when you change the port for the VirtualHost, test again with URLhttp://your.public.ip.address:port/
(try port 8080).Taken from Enabling Internet Access of Websites (for WAMP servers)
将端口从 80 更改为另一个端口号将会完美地工作,请注意,更改端口将需要在防火墙上使用新的 inbond 规则并更改 httpd.config 文件
changing the port from 80 to another port number will work perfect,and please note that changing the port will require a new inbond rule on your firewall and changes on httpd.config file