Init repo
This commit is contained in:
5
default_configuration/nginx/snippets/acme-challenge.conf
Normal file
5
default_configuration/nginx/snippets/acme-challenge.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
location ^~ /.well-known/acme-challenge/ {
|
||||
rewrite ^/.well-known/acme-challenge/(.*) /$1 break;
|
||||
default_type "text/plain";
|
||||
root /acme;
|
||||
}
|
||||
35
default_configuration/nginx/snippets/secure-headers.conf
Normal file
35
default_configuration/nginx/snippets/secure-headers.conf
Normal file
@@ -0,0 +1,35 @@
|
||||
# Ajout HSTS header
|
||||
# Appliquer une durée de plus d'une semaine pour obtenir A+ sur ssl-labs
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; # duration=365days
|
||||
# add_header Strict-Transport-Security "max-age=0; includeSubDomains"; # Désactive HSTS
|
||||
|
||||
|
||||
# Ajoute gzip mais n'enleve pas les ETag headers
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 4;
|
||||
gzip_min_length 256;
|
||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Pagespeed is not supported by Nextcloud, so if your server is built
|
||||
# with the ngx_pagespeed module, uncomment this line to disable it.
|
||||
# pagespeed off;
|
||||
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
add_header X-Download-Options "noopen" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Permitted-Cross-Domain-Policies "none" always;
|
||||
add_header X-Robots-Tag "none" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Content-Security-Policy "upgrade-insecure-requests";
|
||||
add_header Content-Security-Policy-Report-Only " default-src https: data: 'unsafe-inline' 'unsafe-eval'";
|
||||
|
||||
|
||||
# Remove X-Powered-By, which is an information leak
|
||||
fastcgi_hide_header X-Powered-By;
|
||||
21
default_configuration/nginx/snippets/secure-ssl.conf
Normal file
21
default_configuration/nginx/snippets/secure-ssl.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
ssl_dhparam /etc/nginx/dhparam.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3; # Score=100
|
||||
|
||||
# ssl ciphers list
|
||||
ssl_ciphers 'kEECDH+ECDSA+AES128 kEECDH+ECDSA+AES256 kEECDH+AES128 kEECDH+AES256 kEDH+AES128 kEDH+AES256 +SHA !aNULL !eNULL !LOW !kECDH !DSS !MD5 !RC4 !EXP !PSK !SRP !CAMELLIA !SEED'; # Score=90 (recommended because more compatible)
|
||||
# ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL; # Score=100
|
||||
|
||||
# to ensure that the best possible cipher is always included over the weaker ones, chosen from the above order
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
|
||||
# OCSP stapling
|
||||
ssl_stapling on; # allow Nginx to send OCSP results during the connection process
|
||||
ssl_stapling_verify on;
|
||||
resolver 80.67.169.12 80.67.169.40 valid=300s;
|
||||
resolver_timeout 10s;
|
||||
|
||||
# Speeds things up a little bit when resuming a session
|
||||
ssl_session_timeout 5m;
|
||||
ssl_session_cache shared:SSL:5m;
|
||||
|
||||
Reference in New Issue
Block a user