diff --git a/019-ghost.conf b/019-ghost.conf index 3d34674..78ae365 100644 --- a/019-ghost.conf +++ b/019-ghost.conf @@ -28,7 +28,7 @@ server { add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; - add_header Content-Security-Policy "default-src 'none'; child-src 'self'; connect-src 'self' localhost ghost.org resources.ghost.io api.unsplash.com; img-src 'self' data: https: *.gravatar.com *.unsplash.com; script-src 'self' 'unsafe-eval' 'unsafe-inline' localhost cdn.jsdelivr.net api.instagram.com pagead2.googlesyndication.com; style-src 'self' 'unsafe-inline' https: fonts.googleapis.com; font-src 'self' data: https: fonts.googleapis.com themes.googleusercontent.com; frame-ancestors 'self'; base-uri 'self'; form-action 'self' www.paypal.com; media-src https:;"; + add_header Content-Security-Policy "default-src 'none'; child-src 'self'; connect-src 'self' localhost ghost.org resources.ghost.io api.unsplash.com; img-src 'self' blob: data: https: *.gravatar.com *.unsplash.com; script-src 'self' 'unsafe-eval' 'unsafe-inline' localhost cdn.jsdelivr.net api.instagram.com pagead2.googlesyndication.com; style-src 'self' 'unsafe-inline' https: fonts.googleapis.com; font-src 'self' data: https: fonts.googleapis.com themes.googleusercontent.com; frame-ancestors 'self'; base-uri 'self'; form-action 'self' www.paypal.com; media-src https:;"; add_header X-Clacks-Overhead "GNU Terry Pratchett"; charset utf-8; diff --git a/020-ghost-slg.conf b/020-ghost-slg.conf index d963282..1fdfc6d 100644 --- a/020-ghost-slg.conf +++ b/020-ghost-slg.conf @@ -28,7 +28,7 @@ server { add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; - add_header Content-Security-Policy "default-src 'none'; child-src 'self' *.solusar.de *.ghost.io; connect-src 'self' localhost ghost.org resources.ghost.io api.unsplash.com; img-src 'self' data: https: *.gravatar.com *.unsplash.com *.solusar.de; script-src 'self' 'unsafe-eval' 'unsafe-inline' localhost cdn.jsdelivr.net api.instagram.com pagead2.googlesyndication.com code.jquery.com; style-src 'self' 'unsafe-inline' https: fonts.googleapis.com; font-src 'self' data: https: fonts.googleapis.com themes.googleusercontent.com; frame-ancestors 'self'; base-uri 'self'; form-action 'self' www.paypal.com; media-src https:;"; + add_header Content-Security-Policy "default-src 'none'; child-src 'self' *.solusar.de *.ghost.io; connect-src 'self' localhost ghost.org resources.ghost.io api.unsplash.com; img-src 'self' blob: data: https: *.gravatar.com *.unsplash.com *.solusar.de; script-src 'self' 'unsafe-eval' 'unsafe-inline' localhost cdn.jsdelivr.net api.instagram.com pagead2.googlesyndication.com code.jquery.com; style-src 'self' 'unsafe-inline' https: fonts.googleapis.com; font-src 'self' data: https: fonts.googleapis.com themes.googleusercontent.com; frame-ancestors 'self'; base-uri 'self'; form-action 'self' www.paypal.com; media-src https:;"; add_header X-Clacks-Overhead "GNU Terry Pratchett"; charset utf-8; diff --git a/021-authentik.conf b/021-authentik.conf new file mode 100644 index 0000000..bcbf8f5 --- /dev/null +++ b/021-authentik.conf @@ -0,0 +1,57 @@ +# Upgrade WebSocket if requested, otherwise use keepalive +map $http_upgrade $connection_upgrade_keepalive { + default upgrade; + '' ''; +} + +server { + listen 80; + #listen [::]:80; + server_name authentik.solusar.de; + + # Enforce HTTPS + return 301 https://$server_name$request_uri; +} + +server { + listen 443 ssl http2; + #listen [::]:443 ssl http2; + server_name authentik.solusar.de; + + #ssl on; + ssl_certificate /etc/letsencrypt/live/authentik.solusar.de/fullchain.pem; + ssl_trusted_certificate /etc/letsencrypt/live/authentik.solusar.de/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/authentik.solusar.de/privkey.pem; + + ssl_dhparam /etc/myssl/dh4096.pem; + ssl_protocols TLSv1.2; + ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK'; + ssl_session_timeout 5m; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:50m; + + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"; + #add_header X-Frame-Options "SAMEORIGIN"; + #add_header X-Content-Type-Options nosniff; + #add_header X-XSS-Protection "1; mode=block"; + #add_header Content-Security-Policy "default-src 'none'; font-src 'self'; script-src 'self' 'unsafe-inline' https://nc.solusar.de; img-src * data:; object-src 'none'; style-src 'self' 'unsafe-inline' 'sha256-bQfd5MwpJ1ZxnVh373acxlqXQ8VwM88QhEHNuQ0ppNg='; frame-src 'self'; connect-src 'self'; form-action 'self'; base-uri 'self';frame-ancestors 'self';"; + + charset utf-8; + + root /var/www/default; + + access_log /var/log/nginx/018-authentik.org-access.log; + error_log /var/log/nginx/018-authentik-error.log; + #client_max_body_size 300m; + + location / { + proxy_pass http://localhost:9000; + #proxy_set_header Host $host; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ; + proxy_set_header Host $http_host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade_keepalive; + } +}