Why ping Has Nothing to Do With Your Website
Step 1: Is the Web Server Process Running?
BASH
# For Nginx
systemctl status nginx
# For Apache on Debian/Ubuntu
systemctl status apache2
# For Apache on CentOS/RHEL/AlmaLinux
systemctl status httpdactive (running) in the output. If you see inactive (dead), failed, or activating, the web server is not serving requests.
When the status shows failed, the next thing to check is the journal for the reason:
BASH
# Replace 'nginx' with 'apache2' or 'httpd' as needed
journalctl -u nginx --no-pager -n 50- Configuration syntax error. Someone edited a vhost file, made a typo, and restarted the service. The restart failed, and now nothing is running. Both Apache and Nginx refuse to start if the config has a syntax error.
- Port conflict. Another process already holds port 80 or 443. This happens more often than you would expect, especially on servers where both Apache and Nginx were installed at different times. One grabs the port, the other cannot bind to it and exits. A Plesk forum thread documents exactly this scenario: stopping Apache when Nginx is the reverse proxy in front of it, or vice versa, causes confusion about which process should own which port.
- Resource exhaustion. The server ran out of memory, and the OOM killer terminated the web server process. Or the disk filled up and the server could not write to its error log or PID file.
- Missing SSL certificate or key file. If a vhost references a certificate path that no longer exists (deleted, moved, or failed renewal), the web server will refuse to start entirely rather than serve that one site without TLS.
Step 2: Is Anything Listening on Port 80 or 443?
systemctl status looks fine, confirm something is actually bound to the HTTP ports. The ss command (or netstat on older systems) shows listening sockets:
BASH
ss -tlnp | grep -E ':80|:443'TEXT
LISTEN 0 511 0.0.0.0:80 0.0.0.0:* users:(("nginx",pid=1234,fd=6))
LISTEN 0 511 0.0.0.0:443 0.0.0.0:* users:(("nginx",pid=1234,fd=7))systemctl status might say. There are edge cases where systemd reports the service as active but the process exited silently or is stuck in a state where it dropped its listening sockets.
If something unexpected is listening, like a different process name than you expected, that points to a port conflict. You might find Apache holding port 80 when you expected Nginx, or a development server someone left running.
Step 3: The Firewall Layer
iptables, nftables, firewalld, or a cloud provider's security group controls which ports accept inbound traffic.
For firewalld (common on CentOS/AlmaLinux):
firewall-cmd --list-allshows active rules and open services/ports.
iptables:
iptables -L -nlists current rules. Look for ACCEPT rules on ports 80 and 443, or DROP/REJECT rules that might block them.
curl -I http://server-ip or curl -I https://server-ip -k (the -k flag skips certificate verification). If curl gets "connection refused," the port is not open or nothing is listening. If curl hangs with no response, a firewall is likely dropping packets silently.
Step 4: Process Runs, Port Open, but Wrong Response
- The vhost config file exists but is not enabled. On Nginx, the file might be in
sites-availablebut not symlinked intosites-enabled. On Apache with Debian-style layouts, same pattern witha2ensite. - The
ServerName(Apache) orserver_name(Nginx) directive does not match the domain the visitor is requesting. The web server falls back to the default vhost, which might serve a different site entirely. This is closely related to how SNI and default SSL certificates work. - The document root path in the vhost points to a directory that does not exist or has wrong permissions.
- PHP-FPM is down. The web server is running, but it cannot hand off
.phprequests to the PHP processor. The result is often a 502 Bad Gateway (Nginx) or 503 Service Unavailable (Apache with proxy to FPM). Checksystemctl status php*-fpmto see if the PHP-FPM service is alive.
- Nginx:
nginx -t - Apache:
apachectl configtestorhttpd -t
Writing a Clear Escalation Note
systemctl status shows failed state. Journal shows [specific error, e.g., 'bind() to 0.0.0.0:80 failed: Address already in use']. Did not restart because [reason, e.g., config syntax test fails]. Needs review of [specific config file or port conflict]."
If the port is blocked:
"Nginx is running and listening on :80/:443 per ss -tlnp. External curl from [location] times out. OS-level iptables shows no ACCEPT rule for port 80. Likely firewall or security group issue. Customer does not have cloud dashboard access, needs infra team to check."
If the vhost is broken:
"Apache is running, port 80 responds, but domain example.com returns the default page instead of the customer's site. Vhost file exists at /etc/apache2/sites-available/example.com.conf but is not symlinked to sites-enabled. Did not enable it because the DocumentRoot path references a directory that does not exist. Need to confirm correct path with customer."
Each of these tells the next person what layer is broken, what evidence you have, and what remains to be done. No guessing, no re-checking work already completed.
