Updated:

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

CodeMeaningCheck first
200Successful responseHeaders, cache, body
204Success without bodyHealth-check endpoints
301Permanent redirectLocation, canonical URL
302Temporary redirectLocation, login/redirect logic
304Not modifiedCache validators, ETag, Last-Modified
400Bad requestURL, Host, headers
401Authentication requiredAuth layer
403ForbiddenPermissions, index, Nginx location
404Not foundFile, route, try_files
405Method not allowedGET/POST/HEAD handling
408Request timeoutClient/proxy/network
429Rate limitLimits, anti-abuse, WAF
500Server errorBackend/app logs
502Bad gatewayUpstream unavailable
503Service unavailableService down/maintenance
504Gateway timeoutUpstream 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