Where do you configure the IP addresses allowed to connect to the Rails application?
I have a simple rails application that I inherited that runs in the development environment on Ubuntu 14.04.
It worked fine until recently, when some changes were merged with git. Now, when I start rails s, the application seems to start working as a server, as expected.
=> Booting Thin
=> Rails 4.2.1 application starting in development on http:
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on localhost:3000, CTRL+C to stop
netstat shows that the rails are actually wiretapped as expected
tcp 0 0 localhost:3000 *:* LISTEN
I can access the ok website from the browser in the server field using 127.0.0.1:3000, and everything seems to work as it should. I can’t access it from any other machine, because the failure status is returned because the rails only allow localhost on port 3000.
If I run Thin from the command line using thin start, it will return with a similar setting
>> Using rack adapter
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
But this time, Thin listens for connections from any IP address, and I can get to the site from another computer. There is a difference in behavior between starting Thin and starting Thin from rails, although both versions are version 1.5.1. Something in the Rails configuration limits Thin to listen only for connections to localhost.
, . , eventmachine, .
.