如何将我的 WAMP 放到网上以供他人访问?

发布于 2024-09-28 21:05:32 字数 164 浏览 2 评论 0原文

我想简单地打开我的计算机,让我的业务合作伙伴看到我在本地主机上开发的内容。我知道这可能存在一些安全问题,但我只想打开我的计算机几分钟。

我需要在以下接口上设置什么才能执行此操作?

  1. 我的无线路由器
  2. windows7
  3. 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?

  1. my wireless router
  2. windows7
  3. WAMP

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

深白境迁sunset 2024-10-05 21:05:32

这对于我在 WinXP 上来说非常容易。

  • 启动命令提示符并输入 ipconfig /all - 获取您的本地 IP 地址
  • 登录您的路由器并设置端口转发以将 HTTP 转发到您的本地 IP 地址
  • 单击您的 WAMP 图标,然后再次单击“ Put Online”
  • 转到您的远程 IP(您可以在 http://www.whatsmyip.org/)

This works very easily for me on WinXP.

  • Fire up the command prompt and enter ipconfig /all - get your local IP address
  • Log into your router and set up port forwarding to forward HTTP to your local IP address
  • Click on your WAMP icon and click again on "Put Online"
  • Go to your remote IP (you can find it somewhere like http://www.whatsmyip.org/)
铃予 2024-10-05 21:05:32

另一种选择是简单地使用隧道服务,例如:

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.

墨小墨 2024-10-05 21:05:32

要允许外部连接到您的服务器,您必须以在线模式重新启动 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!

人疚 2024-10-05 21:05:32

如果您的 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

给妤﹃绝世温柔 2024-10-05 21:05:32
  • 确保端口 80 上的传入流量未被防火墙或 ISP 阻止 - 观看此视频演示
  • 然后,配置您的路由器进行转发:
    向您的外部 IP 端口 80 发送至您的内部 IP 端口 80 的传入请求 - 此处的视频演示
  • 最后测试端口是否打开 - 视频演示
  • make sure the incoming traffic on port 80 is not blocked by your firewall or ISP - see this video demo
  • then, configure your Router to forward:
    incoming requests to your External IP port 80 towards your Internal IP port 80 - video demo here
  • finally test if port open - video demo
丢了幸福的猪 2024-10-05 21:05:32

有多种因素(实际 WAMP 服务器之外)都会阻止来自外部(例如,来自互联网)的请求到达正在运行的 Apache 服务器。

首先,您需要确保您有一个静态 IP 地址,并且最好还有一个注册域名,并且为该 IP 地址设置了“A”记录 (DNS) - 对于 ServerName 和所有VirtualHost 中使用的ServerAlias 主机(即“www”)。

否则,如果您有动态 IP 地址,请使用动态 DNS 客户端将更改的 IP 地址与域名的 DNS 记录同步。

然后:

  1. 您需要打开 Windows 防火墙以允许传入端口 80 (http) 和端口 443 (https) TCP 数据包。

  2. 您需要将路由器(您的 WiFi 盒子)中的端口 80 和 443“端口转发”到服务器的 LAN IP。

  3. 您需要检查您的 ISP 是否阻止传入端口 80(和 443)请求。如果是,您需要更改此 VirtualHost 正在侦听\绑定的端口。您可以使用外部代理网站并输入 http://your.public.ip.address/ 作为要访问的 URL 来进行此测试。如果请求超时,则它永远不会通过。然后,当您更改 VirtualHost 的端口时,请使用 URL http://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 the ServerAlias 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:

  1. You'll need to open Windows Firewall to allow incoming port 80 (http) and port 443 (https) TCP packets.

  2. You'll need to "port-forward" ports 80 and 443 in the Router (your WiFi box) to the LAN IP of the server.

  3. 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 URL http://your.public.ip.address:port/ (try port 8080).

Taken from Enabling Internet Access of Websites (for WAMP servers)

蓝眼泪 2024-10-05 21:05:32

将端口从 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文