Hostxpeed
Login Get Started →
Troubleshooting

Fix Website "ERR_CONNECTION_REFUSED"

4 min read
32 views
Jun 12, 2026

Understanding the Error

This browser error means nothing is listening on the port you're trying to connect to.

Fix 1: Check Web Server is Running

# Nginx
sudo systemctl status nginx

# Apache
sudo systemctl status apache2

# If stopped
sudo systemctl start nginx
sudo systemctl enable nginx

Fix 2: Check Port 80/443

sudo netstat -tlnp | grep :80
sudo netstat -tlnp | grep :443
sudo ss -tlnp | grep -E "80|443"

If nothing listening, web server isn't binding to port.

Fix 3: Check Firewall

sudo ufw status
sudo iptables -L -n

# Allow ports
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload

Fix 4: Check if Something Else is Using Port

sudo lsof -i :80

If another service is using port 80, stop it or reconfigure.

Fix 5: Verify IP Address

Make sure you're using the correct IP. Test locally:

curl -I http://localhost
wget -O- http://localhost | head

If local works, issue is network/firewall related.

Fix 6: Cloud/VPS Provider Security Groups

Check Hostxpeed control panel for network security rules allowing port 80/443.

Was this article helpful?