Apache
Cheat sheet · https://pcornel.dk/topic.php?topic=2875
Answer
Apache httpd (package apache2 on Debian, httpd on RHEL) is a modular web server with virtual hosts, .htaccess, and modules such as mod_ssl, mod_rewrite and mod_proxy.
Remember
Config layout differs: Debian uses sites-available/sites-enabled with a2ensite/a2enmod; RHEL uses /etc/httpd/conf.d/. apachectl -S lists virtual hosts and which one is default. Reload with systemctl reload.
First checks
apachectl -S— virtual host overviewsystemctl 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 httpdsystemctl reload apache2systemctl reload
Verify in this order
request → listening socket → virtual host by name/port → modules and directives → content or proxy
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=2875