summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2016-11-22 21:56:20 +0000
committerJohannes Löthberg <johannes@kyriasis.com>2016-11-22 21:56:20 +0000
commitfc1ce15d35d8287147f473bad2b9448c8de40ad5 (patch)
treecf1f613c7e07cb8b294d9b16d70549cd21a62836
parentc892ede9a8410b81b57191bc63542742e1cc3a2f (diff)
downloadpillar-fc1ce15d35d8287147f473bad2b9448c8de40ad5.tar.xz
Simplify nginx configs slightly
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rw-r--r--theos/nginx/git_kyriasis_com.sls2
-rw-r--r--theos/nginx/theos_kyriasis_com.sls2
-rw-r--r--theos/nginx/xan_kyriasis_com.sls9
3 files changed, 4 insertions, 9 deletions
diff --git a/theos/nginx/git_kyriasis_com.sls b/theos/nginx/git_kyriasis_com.sls
index 94631bb..d2c8fb2 100644
--- a/theos/nginx/git_kyriasis_com.sls
+++ b/theos/nginx/git_kyriasis_com.sls
@@ -9,7 +9,7 @@ nginx:
- server_name: git.kyriasis.com
- listen: 80
- listen: '[::]:80'
- - rewrite: '^ https://$server_name$request_uri? permanent'
+ - rewrite: '301 https://$server_name$request_uri'
- server:
- server_name: git.kyriasis.com
diff --git a/theos/nginx/theos_kyriasis_com.sls b/theos/nginx/theos_kyriasis_com.sls
index 6f9f6fc..4b5f25d 100644
--- a/theos/nginx/theos_kyriasis_com.sls
+++ b/theos/nginx/theos_kyriasis_com.sls
@@ -9,7 +9,7 @@ nginx:
- server_name: theos.kyriasis.com
- listen: 80
- listen: '[::]:80'
- - rewrite: '^ https://$server_name$request_uri? permanent'
+ - rewrite: '301 https://$server_name$request_uri'
- server:
- server_name: theos.kyriasis.com
diff --git a/theos/nginx/xan_kyriasis_com.sls b/theos/nginx/xan_kyriasis_com.sls
index 7ba7f9a..ad81a1a 100644
--- a/theos/nginx/xan_kyriasis_com.sls
+++ b/theos/nginx/xan_kyriasis_com.sls
@@ -39,9 +39,8 @@ nginx:
- client_max_body_size: 100m
- client_body_timeout: 60
- - location /:
- - index: index.php
- - try_files: $uri $uri/ @mediawiki
+ - try_files: $uri $uri/ @mediawiki
+ - index: index.php index.html
- location @mediawiki:
- rewrite: '^/(.*)$ /index.php?title=$1&$args'
@@ -50,7 +49,6 @@ nginx:
- 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)$:
@@ -64,9 +62,6 @@ nginx:
- 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/