Exercise 3: Confirming the Apache Reverse Proxy — Possible Solution ==================================================================== APACHE CONFIGURATION ------------------------------ ServerName osztromok.com ProxyPreserveHost On ProxyPass / http://127.0.0.1:3000/ ProxyPassReverse / http://127.0.0.1:3000/ 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 3000 (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:3000 directly on the server itself - Apache genuinely forwards every request to the Express process behind it, over HTTPS on the domain's own real certificate. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly configures ProxyPass/ProxyPassReverse pointing at the Express 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 - the identical configuration and confirmation already used in the Astro rebuild's own Chapter 11.