Report this

What is the reason for this report?

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

Posted on February 23, 2016

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)… 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|: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)|127.0.0.1|: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.



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!

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:

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.