Reverse Proxy
Cheat sheet · https://pcornel.dk/topic.php?topic=2878
Answer
A reverse proxy (Nginx, Apache mod_proxy, HAProxy) accepts client requests and forwards them to backend servers, often terminating TLS, adding headers and balancing load.
Remember
Pass the original host and client address (Host, X-Forwarded-For, X-Forwarded-Proto). On RHEL, SELinux blocks the proxy from connecting out unless setsebool -P httpd_can_network_connect 1. Tune timeouts for slow backends.
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)
Verify in this order
client → proxy (TLS terminated) → upstream selected → request forwarded with headers → backend response returned
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=2878