1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zusam_ynh.git synced 2024-09-03 18:05:54 +02:00

corrections in nginx.conf

This commit is contained in:
dragondaddy 2023-08-07 09:55:28 +02:00
parent 89c5717751
commit d5456169c8

View file

@ -1,43 +1,29 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { port_in_redirect off;
client_max_body_size 2048M;
# Path to source root __INSTALL_DIR__/public;
alias __INSTALL_DIR__/; location / {
try_files $uri /index.html;
### Example PHP configuration (remove it if not used) }
index index.php; location ~ \.(js|png|css|woff2)$ {
expires 1M;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file add_header Cache-Control "public";
client_max_body_size 2048M; }
location /files {
expires 1M;
location / { try_files $uri =404;
try_files $uri /index.html; }
} location /api {
location ~ \.(js|png|css|woff2)$ { try_files $uri /api/index.php$is_args$args;
expires 1M; }
add_header Cache-Control "public"; location ~ ^/api/index\.php(/|$) {
} fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
location /files { fastcgi_split_path_info ^(.+\.php)(/.*)$;
expires 1M; include fastcgi.conf;
try_files $uri =404; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
} fastcgi_param DOCUMENT_ROOT $realpath_root/api;
location /api { internal;
try_files $uri /api/index.php$is_args$args; }
} location ~ \.php$ {
location ~ ^/api/index\.php(/|$) { return 404;
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;
}