summaryrefslogtreecommitdiff
path: root/confs/pantsu.cat.conf
diff options
context:
space:
mode:
authorEliot Whalan <ewhal@pantsu.cat>2016-06-19 00:25:55 +0200
committerEliot Whalan <ewhal@pantsu.cat>2016-06-19 00:25:55 +0200
commit24744dc8477d62646e0b78d46a80670892b2f01a (patch)
tree1d62b947d833b291ae4caf48445fc931be20f3cd /confs/pantsu.cat.conf
parentbbf66982fa132454a6dcff57e155f2fa14644a99 (diff)
Introduce configuration examples
Diffstat (limited to 'confs/pantsu.cat.conf')
-rw-r--r--confs/pantsu.cat.conf51
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;
+
+}