HTTP status codes
The HTTP status code is the first signal in diagnostics.
It does not always explain the root cause, but it quickly points you in the right direction: success, redirect, missing file, access issue, or server-side failure.
Quick check
curl -kI https://getsrv.app/
curl -kI https://getsrv.app/no-such-page
For a short smoke-test:
curl -kS -o /dev/null -w '%{http_code}\n' https://getsrv.app/
Short status map
| Code | Meaning | Check first |
|---|---|---|
200 | Successful response | Headers, cache, body |
204 | Success without body | Health-check endpoints |
301 | Permanent redirect | Location, canonical URL |
302 | Temporary redirect | Location, login/redirect logic |
304 | Not modified | Cache validators, ETag, Last-Modified |
400 | Bad request | URL, Host, headers |
401 | Authentication required | Auth layer |
403 | Forbidden | Permissions, index, Nginx location |
404 | Not found | File, route, try_files |
405 | Method not allowed | GET/POST/HEAD handling |
408 | Request timeout | Client/proxy/network |
429 | Rate limit | Limits, anti-abuse, WAF |
500 | Server error | Backend/app logs |
502 | Bad gateway | Upstream unavailable |
503 | Service unavailable | Service down/maintenance |
504 | Gateway timeout | Upstream timeout |
200 OK
The page exists and was returned successfully.
Check:
curl -kI https://getsrv.app/
But 200 alone does not mean everything is correct. After it, check:
content-type;cache-control;- security headers;
- expected body;
- no third-party runtime requests.
301 and 302
Check redirects with and without -L.
Without following:
curl -kI https://getsrv.app/some-path
With following:
curl -kIL https://getsrv.app/some-path
Look at:
location: ...
If the redirect is unexpected, inspect Nginx return, rewrite, canonical rules, and trailing slash behavior.
304 Not Modified
304 is cache-related. The server says: “the client already has a fresh version”.
Check validators:
curl -kI https://getsrv.app/
Look for:
etag
last-modified
cache-control
For a static site, this is normal when cache is configured correctly.
403 Forbidden
Common reasons:
- missing
index.html; - directory exists but index is missing;
- wrong permissions;
- Nginx denies access;
- request reached the wrong
location.
Check:
sudo test -f /var/www/getsrv.app/index.html && echo "index OK" || echo "index missing"
namei -l /var/www/getsrv.app/index.html
curl -kI https://getsrv.app/
Quick permission fix:
sudo find /var/www/getsrv.app -type d -exec chmod 755 {} \;
sudo find /var/www/getsrv.app -type f -exec chmod 644 {} \;
sudo chown -R www-data:www-data /var/www/getsrv.app
404 Not Found
For a static build, /en/docs/cache-control/ normally maps to:
/var/www/getsrv.app/en/docs/cache-control/index.html
Check:
sudo test -f /var/www/getsrv.app/en/docs/cache-control/index.html && echo OK || echo missing
If the file exists in dist but not in /var/www, deploy again.
If it does not exist in dist, check the Astro route or filename.
500, 502, 503, 504
On a pure static site, these usually point above the HTML file:
- Nginx;
- reverse proxy;
- upstream;
- firewall;
- service routing.
Quick checks:
sudo nginx -t
sudo systemctl status nginx --no-pager
sudo ss -lntp | grep -E ':(80|443|7443)\b'
Minimal static-site smoke-test
curl -kS -o /dev/null -w '/ %{http_code}\n' https://getsrv.app/
curl -kS -o /dev/null -w '/en/docs/ %{http_code}\n' https://getsrv.app/en/docs/
curl -kS -o /dev/null -w '/en/tools/ %{http_code}\n' https://getsrv.app/en/tools/
curl -kS -o /dev/null -w '/sitemap %{http_code}\n' https://getsrv.app/sitemap-index.xml
curl -kS -o /dev/null -w '/missing %{http_code}\n' https://getsrv.app/no-such-page
Expected:
/ 200
/en/docs/ 200
/en/tools/ 200
/sitemap 200
/missing 404