From d5456169c84211daa5197a1acbed844f99aca853 Mon Sep 17 00:00:00 2001 From: dragondaddy Date: Mon, 7 Aug 2023 09:55:28 +0200 Subject: [PATCH] corrections in nginx.conf --- conf/nginx.conf | 70 ++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 42 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b483cee..67d7a3e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,43 +1,29 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { - - # Path to source - alias __INSTALL_DIR__/; - -### Example PHP configuration (remove it if not used) - index index.php; - - # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - client_max_body_size 2048M; - - - location / { - try_files $uri /index.html; - } - location ~ \.(js|png|css|woff2)$ { - expires 1M; - add_header Cache-Control "public"; - } - location /files { - expires 1M; - try_files $uri =404; - } - location /api { - try_files $uri /api/index.php$is_args$args; - } - location ~ ^/api/index\.php(/|$) { - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - fastcgi_split_path_info ^(.+\.php)(/.*)$; - include fastcgi.conf; - fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; - fastcgi_param DOCUMENT_ROOT $realpath_root/api; - internal; - } - location ~ \.php$ { - return 404; - } -### End of PHP configuration part - - # Include SSOWAT user panel. - # include conf.d/yunohost_panel.conf.inc; -} + port_in_redirect off; + client_max_body_size 2048M; + root __INSTALL_DIR__/public; + location / { + try_files $uri /index.html; + } + location ~ \.(js|png|css|woff2)$ { + expires 1M; + add_header Cache-Control "public"; + } + location /files { + expires 1M; + try_files $uri =404; + } + location /api { + try_files $uri /api/index.php$is_args$args; + } + location ~ ^/api/index\.php(/|$) { + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_split_path_info ^(.+\.php)(/.*)$; + include fastcgi.conf; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root/api; + internal; + } + location ~ \.php$ { + return 404; + }