Port 80 failed: Connection refused

Suddenly my server down !, and when tried curl http://myip -v

* Rebuilt URL to: http://myip/
*   Trying myip...
* connect to myip port 80 failed: Connection refused
* Failed to connect to myip port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to myip port 80: Connection refused

How detect the reason ? which log file can i see it ?

Please help.

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Nobody helped him, and I have the same problem. This doesn’t seem very straightforward. I have tried adding port forwarding, but no luck. I wonder if most of what you find is outdated…also, please stop telling people to “Google” when Google is exactly what brought me here.

Despite ufw or any other firewall rules on the Linux system. There are Firewalls rules in the DigitalOcean “Networking” panel. By default, there’s no 80 rule. You need to add HTTP/HTTPS to the firewall rules.

  • On DigitalOcean Control Panel page,
  • Open “Droplets”, select the droplet used
  • Go to “Networking” and check “Firewalls”, make sure there’s a rule: HTTP, TCP, 80, All IPv4 | All IPv6
  • If not, click the firewall group icon (the blue one above)
  • Under “Inbound Rules”
  • Add “New rule” and select HTTP (and HTTPS if needed)
  • Save and the 80 port should be accessible.

Hope this is helpful.

Hi there,

Just came across this question, this could mean that your web server is not running.

I could suggest starting with the following steps on how to troubleshoot common Nginx problems on a Linux server:

If you are using Apache you could follow the steps here:

Regards, Bobby