From 4a82ce6369d25679c51dc7eb9f207f9069339cab Mon Sep 17 00:00:00 2001 From: Binnette Date: Wed, 6 Apr 2022 23:26:50 +0200 Subject: [PATCH] Fix Nginx conf --- conf/nginx.conf | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 48a0497..46e5e46 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,14 +1,9 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location /selfoss { +location /__PATH__ { # Path to source - root __FINALPATH__/; - access_log /var/log/nginx/rss.access.log; - error_log /var/log/nginx/rss.error.log; - - #index index.php; - #try_files $uri /public/$uri /index.php; - + alias __FINALPATH__/; + location ~ [^/]\.php(/|$) { fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; @@ -20,15 +15,15 @@ location /selfoss { fastcgi_param SCRIPT_FILENAME $request_filename; } - location ~ ^/selfoss/((favicons|thumbnails)/.+)$ { - try_files /selfoss/data/$1 =404; + location ~ ^/__PATH__/((favicons|thumbnails)/.+)$ { + try_files /__PATH__/data/$1 =404; } - location ~ ^/selfoss/$ { + location ~ ^/__PATH__/$ { index index.php; } - location ~ ^/selfoss/(.+)$ { - try_files /selfoss/public/$1 /selfoss/index.php$is_args$args; + location ~ ^/__PATH__/(.+)$ { + try_files /__PATH__/public/$1 /__PATH__/index.php$is_args$args; } }