0

I am using two rails applications, running both with rails s and zeus s -p3001 locally. When I am trying to run my application in another machine, the server started with webbrick is running fine on another system but couldnot run zeus. PLease help me out.

I just gave the url in browser 192.168.1.111:3000 (running). And

`192.168.1.111:3001` (server not found).

I tried zeus s -b 192.168.1.111:3001 but didn't help me.

venkat
  • 796
  • 1
  • 10
  • 28
  • What's the error message you getting from zeus? Can you access zeus _locally_ on the remove machine? – Boris Brodski Aug 27 '15 at 06:02
  • Actually zeus also working fine locally but when trying to access in another machine through IP address it is saying "Server not found" and url is not hitting in zeus server – venkat Aug 27 '15 at 06:06

1 Answers1

1

The problem is, that the zeus bind to the local address (127.0.0.1) prohibiting connections from remove hosts. The proper solution would be to setup the reverse proxy using apache2 or nginx.

Alternatively you may also want to use firewall to redirect requests.

But a quick and dirty solution is to use SSH port forwarding like this:

  • Start zeus on remote machine on port 3000
  • On local machine

    local-machine$ ssh -L 3001:localhost:3000 remote-machine
    
  • On local machine: Connect to localhost:3001 instead of to remote-machine:3000

http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html

Boris Brodski
  • 8,425
  • 4
  • 40
  • 55
  • I tried the last dirty solution like `raj@raj:~$ ssh -L 3001:localhost:3000 192.168.1.111` but it saying **ssh: connect to host 192.168.1.130 port 22: Connection refused** – venkat Aug 27 '15 at 06:45
  • You need to run ssh daemon on your remote machine, of cause. Please, Google for your platform, like “ubuntu install ssh Server“ – Boris Brodski Aug 27 '15 at 07:10