Common causes
- Nginx, Apache or the Node/dev server is stopped or failed to start
- The app listens on a different port, or only on 127.0.0.1 instead of 0.0.0.0
- No HTTPS listener on port 443 while the browser forces HTTPS
- A firewall actively rejects the port (ufw, firewalld, cloud security group)
- DNS points the domain at the wrong server IP
- A local proxy or VPN setting in the browser
How to fix it
- Check the service is running. Run sudo systemctl status nginx (or apache2). If it failed, run sudo nginx -t to find config errors, fix them, then start it with sudo systemctl start nginx.
- See what is listening. Run sudo ss -tlnp | grep -E ':80|:443'. If nothing is on 443, HTTPS is not configured; if the app shows 127.0.0.1:3000, it only accepts local connections.
- Open the firewall. Allow web traffic with sudo ufw allow 'Nginx Full' or sudo firewall-cmd --permanent --add-service=https && sudo firewall-cmd --reload. On cloud servers also check the security group.
- Verify DNS. Run dig +short example.com and compare it to your server's IP. Update the A record if it points somewhere else.
- Fix local dev servers. For localhost errors, start the dev server again and use the exact port it prints. In Docker, publish the port with -p 3000:3000 and bind the app to 0.0.0.0.
- Rule out browser proxy settings. Try another browser or curl -v http://example.com. If curl works, check the browser's proxy or VPN extension.
Check listeners and the web server status
sudo ss -tlnp | grep -E ':(80|443)\b'
sudo systemctl status nginx --no-pager
sudo nginx -t && sudo systemctl restart nginx How to stop it happening again
- Enable web services at boot with systemctl enable
- Test config before restarting services
- Monitor uptime from an outside location
- Document which ports each app uses