diff --git a/conf/nginx.conf b/conf/nginx.conf index 85eecb6..5e15e5e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { # Path to source alias __FINALPATH__/; @@ -18,10 +19,10 @@ location / { include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } location @rewrite { - rewrite ^/(.+)$ /index.php?page=$1 last; + rewrite ^/(.+)$ __PATH__/index.php$is_args$args; } diff --git a/manifest.json b/manifest.json index 1550102..c3e25af 100644 --- a/manifest.json +++ b/manifest.json @@ -35,6 +35,12 @@ "name": "domain", "type": "domain" }, + { + "name": "path", + "type": "path", + "example": "/automad", + "default": "/automad" + }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index bf6f292..208aa9b 100755 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,7 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url="/" +path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC phpversion=$YNH_PHP_VERSION