hi
This commit is contained in:
commit
2a63bc4e50
14 files changed
+1104
No files matched your search
@@ -0,0 +1,23 @@
|
||||
[Unit]
|
||||
Description=Amnesia licensing API
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=amnesia
|
||||
Group=amnesia
|
||||
WorkingDirectory=/srv/amnesia/licensing
|
||||
EnvironmentFile=/etc/amnesia-licensing.env
|
||||
ExecStart=/srv/amnesia/licensing/.venv/bin/python /srv/amnesia/licensing/run.py
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
StateDirectory=amnesia-licensing
|
||||
UMask=0077
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/var/lib/amnesia-licensing
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,2 @@
|
||||
AMNESIA_ORIGIN=https://amnesia.example.com
|
||||
AMNESIA_DATA=/var/lib/amnesia-licensing
|
||||
@@ -0,0 +1,36 @@
|
||||
# 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>
|
||||
Reference in new issue
Block a user