Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed handling of multiple puma endpoints and of wildcard IP addresses #64

Merged
merged 1 commit into from
Sep 12, 2014

Conversation

jabbrwcky
Copy link
Contributor

Improved the handling of multiple upstream endpoints and of app servers configured to use "0.0.0.0" as IP address.

@seuros
Copy link
Owner

seuros commented Sep 12, 2014

why are we replacing 0.0.0.0 by 127.0.0.1 ?

@jabbrwcky
Copy link
Contributor Author

Because 0.0.0.0:1234 is not a valid IP address for nginx to talk to. It is a "wildcard" that causes puma to bind to all available network interfaces on port 1234 including the loopback interface. (e.g.: Host interfaces: 192.168.1.34, 10.0.0.34 and of course 127.0.0.1, passing tcp://0.0.0.0:1234 will bind puma to 192.168.1.34:1234, 1.0.0.34:1234 and 127.0.0.1:1234)

So the only thing guaranteed is that puma will be listening on 127.0.0.1 if we see it in a ssl:// or tcp:// endpoint definition for puma. Any other address will be used verbatim.

@seuros
Copy link
Owner

seuros commented Sep 12, 2014

Fair enough.

seuros added a commit that referenced this pull request Sep 12, 2014
Fixed handling of multiple puma endpoints and of wildcard IP addresses
@seuros seuros merged commit 27bca5e into seuros:master Sep 12, 2014
@seuros
Copy link
Owner

seuros commented Sep 12, 2014

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants