开发者

How do I access my web application from a non-local machine?

开发者 https://www.devze.com 2023-01-03 00:02 出处:网络
I have a Ruby on Rails application that I\'m developing on my computer, which runs Ubuntu 10.04 LTS. I\'d like to be able to ac开发者_如何转开发cess it from a remote computer for testing purposes. I\'

I have a Ruby on Rails application that I'm developing on my computer, which runs Ubuntu 10.04 LTS. I'd like to be able to ac开发者_如何转开发cess it from a remote computer for testing purposes. I've no idea how to proceed. Do I need to set up port forwarding? Virtual hosts? Can anyone point me to an article/tutorial/whatever that has information about how to do this?

Thanks!


If you want to run it using the server script, you can have it listen to a specific IP address like:

script/server -b 192.168.1.5

Substitute your machine's IP address that is accessible over your network. Then other hosts can get to the Rails app via e.g. http://192.168.1.5:3000.

If you mean you're behind a firewall or NAT gateway, then the question of how people outside of your firewall/NAT can get to your machine is another question entirely... something that probably belongs on superuser.com.


The best way I've found is to use http://www.tunnlr.com.

0

精彩评论

暂无评论...
验证码 换一张
取 消