# Load proxy, proxy_http, headers, ssl, rewrite, and http2 in Apache.
# Bongo Web itself listens on 127.0.0.1:8080.
ServerName mail.example.net
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/mail.example.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mail.example.net/privkey.pem
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/ connectiontimeout=5 timeout=60
ProxyPassReverse / http://127.0.0.1:8080/
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
Header always set Strict-Transport-Security "max-age=31536000"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "same-origin"
ErrorLog ${APACHE_LOG_DIR}/bongo-error.log
CustomLog ${APACHE_LOG_DIR}/bongo-access.log combined
ServerName mail.example.net
Redirect permanent / https://mail.example.net/