Troubleshoot a Website That Only Works on Its Server: A Beginner Guide
Before you begin
- Applies to:Ubuntu 26.04 LTS or RHEL 10 web servers with a site reachable only on the server.
- Where to start:Start on the web server, then repeat the connection test from a second device on the authorized network.
- What you need:Have curl, the server address, and the service port. For an HTTPS virtual host, test with its normal hostname and URL.
Guide tools
Before You Start
Use a Linux web server running Ubuntu 26.04 LTS or RHEL 10 and a second device on an authorized network. The examples use an HTTP service on TCP 8080 and curl. Replace 192.168.1.20 and the port with your actual values. For an HTTPS virtual host, use its normal hostname and HTTPS URL in your tests.
Troubleshooting Steps
Check the app and its listening address
Start hereRun on the server. An HTTP response confirms that an HTTP service answered on loopback. A listener on 127.0.0.1 serves local connections only. A reverse proxy may intentionally use a loopback-only upstream. In that setup, check the proxyโs listener separately and keep the upstream private.
curl --head --connect-timeout 4 --max-time 8 http://127.0.0.1:8080/ss -ltn 'sport = :8080'ip -br addressTest the same port from the second device
Narrow the causeRun on the second device. Use curl.exe in PowerShell 7+ on Windows. A response such as 401 or 404 still shows that an HTTP server answered. Connection refused often means no listener at that address or an explicit reject. A timeout can indicate firewall drops, guest Wi-Fi isolation or a routing problem. Compare it with the same URL from the server.
curl --head --connect-timeout 4 --max-time 8 http://192.168.1.20:8080/Correct the confirmed cause and test again
VerifyFor an app meant to listen directly on the LAN, use the intended interface and allow only the approved clients through the firewall. For a reverse proxy, use the proxyโs published address and preserve its private upstream. Record any original settings and restore them if the change fails. Confirm the original client can load the expected page using its normal browser URL.
Reference
Your feedback keeps these production procedures accurate and battle-tested.