如何从外部网络连接到由 Aptana 运行的本地服务器? [英] How do I connect to a local server run by Aptana from an outside network?

查看:46
本文介绍了如何从外部网络连接到由 Aptana 运行的本地服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从 Aptana Studio 运行的 Rails 服务器.我一般通过localhost:300连接,网络上的每个人都通过stonecrab:3000连接(stonecrab是我电脑的名字).但是,如何允许来自本地网络之外的人连接到服务器?例如,如果我的 Internet 连接的 IP 是 123.456.7.8,那么有人可以在 Web 浏览器中使用哪个 URL 连接到我的服务器?我有一个 linksys e1000 路由器,如果我需要更改任何设置,我可以访问它.

I have a rails server that i run from Aptana Studio. I normally connect to it via localhost:300, and everyone on the network connects to it via stonecrab:3000 (stonecrab is the name of my computer). However, how do I allow people from outside the local network to connect to the server? For instance, if the IP of my internet connection is 123.456.7.8, what URL can someone use in a web browser to connect to my server? I have a linksys e1000 router and i can access it if i need to change any settings.

谢谢

推荐答案

默认情况下,您的机器将无法从路由器后面访问.您需要在路由器中启用端口转发.您需要告诉您的路由器将端口 3000 转发到石蟹的 IP.然后你将使用 123.456.7.8:3000 从局域网外访问stonecrabe:3000.

By default, your machine will not be accessible from behind the router. You need to enable port forwarding in your router. You need to tell your router to forward port 3000 to the IP of stonecrab. Then you will use 123.456.7.8:3000 to access stonecrabe:3000 from outside the LAN.

这篇关于如何从外部网络连接到由 Aptana 运行的本地服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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