如何将我的localhost指向公共IP地址 [英] How to point my localhost to a public ip address

查看:1497
本文介绍了如何将我的localhost指向公共IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在我的电脑上设置了 WAMP 2.2 localhost 。我有一切正常运行(我可以执行PHP,MYSQL等...)现在我想知道如何将我的localhost指向一个可以在我的网络外访问的公共IP地址。这可能吗?如果是这样,我该怎么做?
谢谢!

I have just set up a WAMP 2.2 localhost on my computer. I have everything running properly (I can execute PHP, MYSQL, etc...) and am now wondering how I would point my localhost to a public ip-address that could be accessed outside of my network. Is this possible? If so, how would I do that?
Thanks!

编辑:


规格:windows,wamp 2.2 ....只需要向网络外的人提供MYSQL和MYSQLI数据库,php,html,js和css文件。我非常想要用我的localhost创建一个基本的网站。


Specs: windows, wamp 2.2.... Needed just to serve MYSQL and MYSQLI databases, php, html, js, and css files to people outside of my network. I prett much want ot create a basic website with my localhost.

推荐答案

看看 localtunnel 。非常方便回收服务器的服务(如paypal等)。

Have a look at localtunnel. Very handy for services that callback to your server (like paypal etc).

对于Windows上的备选方案,有讨论这里

For alternatives on windows there is discussion here.

最后你可以将一个端口转发回你的内部机器使用像 dyndns 这样的服务。

Finally you could forward a port back to your internal machine and use service like dyndns.

我不能在不了解更多有关您的特定需求的情况下告诉您最好的使用方法。

I couldn't tell you the best one to use without knowing more about your specific needs.

编辑:在看到您真正想要做的事情后,我建议您在路由器上转发端口回到你的网络服务器。 这里有一个简单的指南,你应该能够找出如何适用于你的情况。然后你想使用像提到的dyndns这样的东西来将你自己的IP地址注册到网上的名字。

Upon seeing what you really want to do, I would suggest forwarding a port on your router back to your webserver. There is a simple guide here that you should be able to figure out how to apply to your situation. Then you want to use something like dyndns as mentioned to register your own IP address to a name out onto the web.

这篇关于如何将我的localhost指向公共IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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