如何公开我的本地主机的WWW? (转发端口?) [英] How to expose my localhost to the WWW? (port forwarding?)

查看:198
本文介绍了如何公开我的本地主机的WWW? (转发端口?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的本地运行的Apache / PHP和希望能够使这种公开从Internet访问。

I am running Apache/php on my localhost and would like to be able to make this publicly accessible from the internet.

我认为这是由转发端口实现?有人能指出我朝着正确的方向吗?

I think this is achieved by port forwarding? Can someone point me in the right direction?

推荐答案

这取决于你的连接。

如果你的机器有一个公网IP地址,它是在互联网上了。然后,所有你需要的是允许的80端口的连接,无论是本地防火墙和家庭/企业防火墙上。

If your machine has a public IP address, it's on the Internet already. Then all you need is to allow connections to port 80, both on the local firewall and the home/corporate firewall.

如果你的机器的背后是机顶盒盒,或公司网络内,有机会,你不是在互联网上。在一些情况下,一个路由器是否NAT(网络地址转换的)本地(非路由)之间网络和因特网。在这种特殊情况下,你需要设置端口转发在机顶盒或路由器。

If your machine is behind a set-top-box, or inside a corporate network, chances are that you're not on the Internet. In some instances, a router does NAT (Network Address Translation) between a local (non-routable) network and the Internet. In this particular case, you need to set up port forwarding on the set-top-box or router.

这篇关于如何公开我的本地主机的WWW? (转发端口?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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