From 3418b2a1a2b3439959c476e31e44a48cf46c6813 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 4 Jan 2021 23:43:04 +0100 Subject: [PATCH 1/2] fix --- conf/nginx.conf | 4 +--- manifest.json | 4 ++-- scripts/install | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 63785a1..91f2c50 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,4 @@ -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location / { # Path to source alias __FINALPATH__/public/ ; @@ -18,7 +17,6 @@ location __PATH__/ { location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; diff --git a/manifest.json b/manifest.json index 28f2b77..cce6326 100755 --- a/manifest.json +++ b/manifest.json @@ -40,8 +40,8 @@ "en": "Choose a path for Castopod", "fr": "Choisissez un chemin pour Castopod" }, - "example": "/castopod", - "default": "/castopod" + "example": "/", + "default": "/" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index 1125921..51b6589 100755 --- a/scripts/install +++ b/scripts/install @@ -21,7 +21,7 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH +path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME From 8155176092f789d57f69868b66ee873751ab0677 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 5 Jan 2021 10:18:52 +0100 Subject: [PATCH 2/2] Update nginx.conf --- conf/nginx.conf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 91f2c50..fef01e2 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,19 +1,17 @@ location / { # Path to source - alias __FINALPATH__/public/ ; + alias __FINALPATH__/public/; # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - index index.php index.html ; + index index.php; - # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; + rewrite ^/.*$ /index.php last; - try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;