How do I run a Ruby project on localhost and on the internet at the same time?
I guess
- You want you to show a product running on your local computer to a person on the Internet.
OR
- You are trying to check IPN Paypal notification.
1) Install proxylocal gem
gem install proxylocal
2) Start the rails server in development mode.
3) Start proxy local
$ proxylocal 3000 --host joshi_server
Local server on port 3000 is now publicly available via:
http://joshi_server.t.proxylocal.com/
Now you can access your local server using http://joshi_server.t.proxylocal.com/
anywhere on the Internet.
Note
Similar services
Free: localtunnel , pagekite , yaler ,
Paid for: showoff.io
I found that proxylocal
, localtunnel
and showoff
wrt are similar in ease of use and reliability. I prefer proxylocal
it as it allows me to name and reuse a subdomain for my local server.
Don't use this approach to set up production
source to share
If you mean "how can I make my local web server also accessible from the public internet", then an easy way to get started is to set up an SSH tunnel from a suitable remote host like a VPS or another server to your local machine.
You need to make sure that your configuration sshd
allows tunnel ports to be opened as they are limited by default.
source to share