summaryrefslogtreecommitdiffstats
path: root/theos/nginx/xan_kyriasis_com.sls
diff options
context:
space:
mode:
Diffstat (limited to 'theos/nginx/xan_kyriasis_com.sls')
-rw-r--r--theos/nginx/xan_kyriasis_com.sls73
1 files changed, 73 insertions, 0 deletions
diff --git a/theos/nginx/xan_kyriasis_com.sls b/theos/nginx/xan_kyriasis_com.sls
new file mode 100644
index 0000000..7ba7f9a
--- /dev/null
+++ b/theos/nginx/xan_kyriasis_com.sls
@@ -0,0 +1,73 @@
+nginx:
+ ng:
+ servers:
+ managed:
+ xan.kyriasis.com:
+ enabled: True
+ config:
+ - server:
+ - server_name: xan.kyriasis.com
+ - listen: 80
+ - listen: '[::]:80'
+ - rewrite:
+ - '^ https://$server_name$request_uri?'
+ - permanent
+
+ - server:
+ - server_name: xan.kyriasis.com
+ - listen: 443 ssl http2
+ - listen: '[::]:443 ssl http2'
+
+ - ssl: 'on'
+ - ssl_certificate: /etc/letsencrypt/live/xan.kyriasis.com/fullchain.pem
+ - ssl_certificate_key: /etc/letsencrypt/live/xan.kyriasis.com/privkey.pem
+ - ssl_dhparam: /etc/nginx/dhparam.pem
+
+ - ssl_stapling: 'on'
+ - ssl_stapling_verify: 'on'
+ - ssl_trusted_certificate: /etc/letsencrypt/live/xan.kyriasis.com/fullchain.pem
+
+ # Enable the Cross-site scripting filter in most recent browsers.
+ # Normally enabled by default, but enable it anyway if user has disabled it.
+ - add_header: 'X-XSS-Protection "1; mode=block"'
+
+ # http://www.gnuterrypratchett.com/
+ - add_header: 'X-Clacks-Overhead "GNU Terry Pratchett"'
+
+ - root: /usr/share/webapps/xans-wiki
+
+ - client_max_body_size: 100m
+ - client_body_timeout: 60
+
+ - location /:
+ - index: index.php
+ - try_files: $uri $uri/ @mediawiki
+
+ - location @mediawiki:
+ - rewrite: '^/(.*)$ /index.php?title=$1&$args'
+
+ - location ~ \.php5?$:
+ - include: fastcgi.conf
+ - fastcgi_pass: unix:/var/run/php-fpm/php-fpm.sock
+ - fastcgi_index: index.php
+ - fastcgi_param: SCRIPT_FILENAME $document_root$fastcgi_script_name
+ - try_files: $uri @mediawiki
+
+ - location ~* \.(js|css|png|jpg|jpeg|gif|ico)$:
+ - try_files: $uri /index.php
+ - expires: max
+
+ # Restrictions based on default htaccess file
+ - location ^~ ^/(cache|includes|maintenance|languages|serialized|tests|images/deleted)/:
+ - deny: all
+
+ - location ^~ ^/(bin|docs|extensions|includes|maintenance|mw-config|resources|serialized|tests)/:
+ - internal: ''
+
+ - location ^~ /images/:
+ - try_files: $uri /index.php
+
+ - location /.well-known:
+ - root: /srv/http/
+
+# vim: ft=yaml et: