diff options
Diffstat (limited to 'confs/pantsu.cat.conf')
| -rw-r--r-- | confs/pantsu.cat.conf | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/confs/pantsu.cat.conf b/confs/pantsu.cat.conf new file mode 100644 index 0000000..362ac45 --- /dev/null +++ b/confs/pantsu.cat.conf @@ -0,0 +1,51 @@ +server { + listen 443 ssl deferred http2; + listen [::]:443 ssl deferred http2; + + server_name pantsu.cat www.pantsu.cat; + root /mnt/pantsu/http/pantsu.cat/upload; + include /etc/nginx/includes/lets.conf; + + ssl_certificate /etc/nginx/ssl/pantsu.cat/pantsu.cat_chain.pem; + ssl_certificate_key /etc/nginx/ssl/pantsu.cat/pantsu.cat.key; + add_header Public-Key-Pins 'pin-sha256="iLplfPiBVaaSmbk1Q0A+cY+nkeT0CyWXsjYNWAsI5UI="; pin-sha256="uynduGXAGjJl+B8om1uAZuG+2a9Guk58fjfztwMJGJc=";max-age=5184000;'; + + include /etc/nginx/includes/ssllax.conf; + location /upload.php { + auth_basic "Restricted"; + auth_basic_user_file /etc/nginx/htpasswd; + include /etc/nginx/includes/php.conf; + } + include /etc/nginx/includes/php.conf; + + + location ^~ /includes/ { + deny all; + } + location ^~ /pub/ { + autoindex on; + include /etc/nginx/includes/php.conf; +} + location ^~ /firefox/ { + add_header Content-Security-Policy "default-src 'self'; script-src 'self'; connect-src 'self'; img-src 'self' https://addons.cdn.mozilla.net https://static.addons.mozilla.net; style-src 'self' 'unsafe-inline';font-src 'self';"; + } + + error_page 404 /404.html; + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + include /etc/nginx/includes/cache.conf; + +} + +# redirect all http traffic to https +#lel doesn't work +server { + listen 80; + listen [::]:80; + server_name pantsu.cat www.pantsu.cat; + include /etc/nginx/includes/lets.conf; + return 301 https://$host$request_uri; + +} |
