Exercise 3: Confirming the Apache Reverse Proxy — Possible Solution ==================================================================== APACHE CONFIGURATION ------------------------------ ServerName osztromok.com ProxyPreserveHost On ProxyPass / http://127.0.0.1:4321/ ProxyPassReverse / http://127.0.0.1:4321/ SSLEngine on SSLCertificateFile /etc/letsencrypt/live/osztromok.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/osztromok.com/privkey.pem REQUIRED APACHE MODULES ------------------------------ a2enmod proxy a2enmod proxy_http systemctl reload apache2 CONFIRMATION ------------------------------ With the Node server running under PM2 on port 4321 (not exposed directly to the outside world) and Apache reloaded with this VirtualHost active, visiting https://osztromok.com serves the exact same site as visiting http://127.0.0.1:4321 directly on the server itself - Apache is genuinely forwarding every request to the Node process behind it, over HTTPS on the domain's own real certificate, rather than visitors needing to know or use the raw Node port at all. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly configures ProxyPass/ProxyPassReverse pointing at the Node server's own local port, correctly enables the required mod_proxy and mod_proxy_http modules, and correctly confirms the site is reachable through Apache's own domain and TLS certificate rather than the internal Node port.