1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zusam_ynh.git synced 2024-09-03 18:05:54 +02:00
zusam_ynh/conf/nginx.conf
2023-08-10 02:55:36 +02:00

29 lines
875 B
Nginx Configuration File

#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
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;
more_set_headers '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;
}