# Apache virtual hosts that publish the production container as https:/// # NOT applied by the deployment. Replace , the certificate paths and the upstream address (the host and the # NTP_PORT of the container), then: # sudo a2enmod proxy proxy_http headers rewrite ssl # sudo a2ensite ntp-prod && sudo apachectl configtest && sudo systemctl reload apache2 ServerName RewriteEngine On RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] ServerName ErrorLog ${APACHE_LOG_DIR}/ntp_prod_error.log CustomLog ${APACHE_LOG_DIR}/ntp_prod_access.log combined SSLEngine on SSLCertificateFile /etc/apache2/certificate/.cer SSLCertificateKeyFile /etc/apache2/certificate/.key ProxyPreserveHost On RequestHeader set X-Forwarded-Proto "https" # browser hardening (the API also sets these; Apache covers its own error pages) Header always set Strict-Transport-Security "max-age=31536000" Header always set X-Content-Type-Options "nosniff" Header always set X-Frame-Options "DENY" Header always set Referrer-Policy "same-origin" ProxyTimeout 120 ProxyPass / http://127.0.0.1:8081/ ProxyPassReverse / http://127.0.0.1:8081/