My website shows "port 80: Connection refused"

Linode Staff

Hello,

My website is down, I don't know why. Could you please help me? I'm running Ubuntu, Apache and MySQL.

-A INPUT -p tcp -m multiport --dports 110,995 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 143,993 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 3306,5432 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8083 -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -s 123.456.789.111/32 -j ACCEPT
-A INPUT -s 127.0.0.1/32 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 20 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 21 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 25 -j ACCEPT
-A INPUT -p udp -m udp --sport 53 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 443 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 110 -j ACCEPT
-A INPUT -p udp -m udp --sport 123 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 143 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 3306 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 5432 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 8080 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 8433 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 8083 -j ACCEPT
-A fail2ban-MAIL -j RETURN
-A fail2ban-SSH -j RETURN
-A fail2ban-VESTA -j RETURN
-A fail2ban-ssh -j RETURN
-A fail2ban-ssh -j RETURN
-A fail2ban-ssh -j RETURN
-A fail2ban-ssh -j RETURN


Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State e
tcp 0 0 0.0.0.0:30050 0.0.0.0:* LISTEN d
tcp 0 0 0.0.0.0:30022 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8083 0.0.0.0:* LISTEN x
tcp 0 0 123.456.789.111:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp6 0 0 :::30022 :::* LISTEN
tcp6 0 0 ::1:953 :::* LISTEN
udp 49152 0 123.456.789.111:123 0.0.0.0:*
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
udp 0 0 0.0.0.0:34319 0.0.0.0:*
udp 0 0 123.456.789.111:53 0.0.0.0:*
udp 35328 0 127.0.0.1:53 0.0.0.0:*
udp 0 0 0.0.0.0:68 0.0.0.0:*
udp6 0 0 2a01:7e00::ffff:fe9:12345 :::*
udp6 0 0 fe80::f03c:ffff:fe8:12345 :::*
udp6 0 0 ::1:123 :::*
udp6 0 0 :::123 :::*
udp6 0 0 :::48526 :::*


curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused

1 Reply

Hi,

The connection refused error is most commonly caused by a firewall or service not running. From your output we can see that you have your firewall ports open but there is no service listening on port 80. I would first try starting your application(if you find you need to start MySQL as well, you can just insert mysqld or mysql as the service):

sudo service apache2 start

If this runs successfully it should bring your site back up, if not it will produce errors that you can use to further troubleshoot with and can provide here. Additional commands that you may find useful are the Apache syntax configuration test:

sudo apachectl -t

And, of course, it's worth checking out your /var/log/apache2/error.log for more information.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct