29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
# Apache virtual hosts that publish the QA container (127.0.0.1:8081) as https://ntpv2.nafithit.com/
|
|
# NOT applied by the deployment: add it to /etc/apache2/sites-available/ntpv2.conf, then
|
|
# sudo a2enmod proxy proxy_http headers rewrite ssl
|
|
# sudo a2ensite ntpv2 && sudo apachectl configtest && sudo systemctl reload apache2
|
|
# Replace the two certificate paths with a certificate that covers ntpv2.nafithit.com
|
|
# (the existing nafithnet2025 certificate is for *.nafith.net only).
|
|
|
|
<VirtualHost *:80>
|
|
ServerName ntpv2.nafithit.com
|
|
RewriteEngine On
|
|
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
|
|
</VirtualHost>
|
|
|
|
<VirtualHost *:443>
|
|
ServerName ntpv2.nafithit.com
|
|
ErrorLog ${APACHE_LOG_DIR}/ntpv2_error.log
|
|
CustomLog ${APACHE_LOG_DIR}/ntpv2_access.log combined
|
|
|
|
SSLEngine on
|
|
SSLCertificateFile /etc/apache2/certificate/ntpv2.nafithit.com.cer
|
|
SSLCertificateKeyFile /etc/apache2/certificate/ntpv2.nafithit.com.key
|
|
|
|
ProxyPreserveHost On
|
|
RequestHeader set X-Forwarded-Proto "https"
|
|
ProxyTimeout 120
|
|
ProxyPass / http://127.0.0.1:8081/
|
|
ProxyPassReverse / http://127.0.0.1:8081/
|
|
</VirtualHost>
|