From fc1ce15d35d8287147f473bad2b9448c8de40ad5 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 22 Nov 2016 21:56:20 +0000 Subject: Simplify nginx configs slightly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- theos/nginx/git_kyriasis_com.sls | 2 +- theos/nginx/theos_kyriasis_com.sls | 2 +- theos/nginx/xan_kyriasis_com.sls | 9 ++------- 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/ -- cgit v1.2.3-54-g00ecf