From f226c921b460240d2cee864788302d80b6cbecbb Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sat, 31 Aug 2019 16:02:17 +0200 Subject: Move xan's wiki under /wiki MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- nginx/xan_kyriasis_com.sls | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/nginx/xan_kyriasis_com.sls b/nginx/xan_kyriasis_com.sls index 8cf4a0e..0168f4e 100644 --- a/nginx/xan_kyriasis_com.sls +++ b/nginx/xan_kyriasis_com.sls @@ -47,33 +47,34 @@ nginx: # 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 - - try_files: $uri $uri/ @mediawiki - - index: index.php index.html - - location @mediawiki: - - rewrite: '^/(.*)$ /index.php?title=$1&$args' + - location /wiki: + - root: /usr/share/webapps/xans-wiki + - index: index.php index.html + - try_files: $uri $uri/ @mediawiki + + - location @mediawiki: + - rewrite: '^/wiki([^?]*)(?:\?(.*))? /index.php5?title=$1&$2 last;' - - location ~ \.php5?$: - - include: fastcgi.conf - - fastcgi_pass: unix:/var/run/php-fpm/php-fpm.sock - - fastcgi_index: index.php - - try_files: $uri @mediawiki + - location ~ \.php$: + - include: fastcgi.conf + - fastcgi_pass: unix:/var/run/php-fpm/php-fpm.sock + - fastcgi_index: index.php + - try_files: $uri @mediawiki - - location ~* \.(js|css|png|jpg|jpeg|gif|ico)$: - - try_files: $uri /index.php - - expires: max + - 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 + # 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 ^~ ^/(bin|docs|extensions|includes|maintenance|mw-config|resources|serialized|tests)/: + - internal: '' - location /.well-known/acme-challenge: - root: /srv/http/ -- cgit v1.2.3-54-g00ecf