port 80 is accessible through localhost but the connection is refused externally

The domain name pointing to my droplet can’t be accessed at port 80, but 443 works: $ wget http://{my ip} –2016-02-22 23:33:51-- http://{my ip}/ Connecting to {my ip}… failed: Connection refused. $ wget https://{my ip} –2016-02-22 23:34:09-- https://{my ip}/ Connecting to {my ip}:443… connected.

In the droplet itself, I can access port 80 (where the web server redirects to 443) $ wget http://localhost –2016-02-23 02:35:29-- http://localhost/ Resolving localhost (localhost)… Connecting to localhost (localhost)||:80… connected. HTTP request sent, awaiting response… 301 Moved Permanently Location: https://localhost/ [following] –2016-02-23 02:35:29-- https://localhost/ Connecting to localhost (localhost)||:443… connected.

The server itself is a Play Framework server which listens on both port 80 and 443 using authbind, running as an unprivileged user. (both with IPv6) $ authbind --deep myserver -Dhttp.port=80 -Dhttps.port=443 … [info] - play.api.Play - Application started (Prod) [info] - play.core.server.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:80 [info] - play.core.server.NettyServer - Listening for HTTPS on port /0:0:0:0:0:0:0:0:443

It is basically a vanilla Ubuntu 15.10 x32 droplet. Is there some obvious place to look for configuration problems? I would just like to keep the networking simple and serve directly from port 80, and it’s hard to determine what is stopping me from doing so.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@gracenotes - On your server, try modifying and trying the following before starting your authbind command:

touch /etc/authbind/byaddr/${MYINET},80
chown ${PLAYUSERNAME} /etc/authbind/byaddr/${MYINET},80
chmod 755 /etc/authbind/byaddr/${MYINET},80