Files
licensing/deploy/apache-amnesia.conf
2026-10-19 17:08:07 -05:00

37 lines
1.5 KiB
Plaintext

# Replace amnesia.example.com with your domain and use its existing TLS certificate.
# Required modules: proxy proxy_http headers ssl
<VirtualHost *:80>
ServerName amnesia.example.com
Redirect permanent / https://amnesia.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName amnesia.example.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/amnesia.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/amnesia.example.com/privkey.pem
DocumentRoot /srv/amnesia/website/public
<Directory /srv/amnesia/website/public>
Options -Indexes
AllowOverride None
Require all granted
</Directory>
ProxyRequests Off
ProxyPreserveHost On
RequestHeader unset X-Forwarded-For early
RequestHeader unset Forwarded early
RequestHeader set X-Forwarded-Proto "https"
ProxyPass /api/ http://127.0.0.1:8787/api/ timeout=30
ProxyPassReverse /api/ http://127.0.0.1:8787/api/
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "same-origin"
Header always set Strict-Transport-Security "max-age=31536000"
Header always set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'"
ErrorLog ${APACHE_LOG_DIR}/amnesia-error.log
CustomLog ${APACHE_LOG_DIR}/amnesia-access.log combined
</VirtualHost>