Web Services
Cheat sheet · https://pcornel.dk/topic.php?topic=2874
Answer
Linux web services are mainly Apache httpd and Nginx serving static content, running applications (PHP-FPM, app servers) or acting as reverse proxies, usually with TLS.
Remember
Read the HTTP status: 502/504 point to the backend, 403 to permissions or SELinux, 404 to paths or virtual host, TLS errors to certificates. Always test the config before reloading.
First checks
systemctl status nginx|apache2|httpd— web server statenginx -t / apachectl configtest— configuration testss -ltnp | grep -E ':80|:443'— listening portscurl -vI https://<name>— response, headers and TLStail -f /var/log/nginx/error.log— error log (or apache2/httpd)
Commands
systemctl reload apache2systemctl reload nginxss -ltnp
Verify in this order
client request → DNS → TCP/TLS → virtual host → content or backend → response
Where it usually breaks
First mismatch in persistent intent → provider/parser/generator → kernel/userspace runtime → dependency/security context → logs/counters → consumer-visible read-back; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2874