1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kimai2_ynh.git synced 2024-09-03 19:26:26 +02:00

Upgrade nginx configuration

This commit is contained in:
yalh76 2020-04-19 19:37:20 +02:00
parent d44cfc271a
commit cbe6e044c1
2 changed files with 10 additions and 12 deletions

View file

@ -1,21 +1,23 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
root __FINALPATH__/public/ ;
location __PATH__/ { location __PATH__/ {
# Path to source # Path to source
alias __FINALPATH__/public/; # alias __FINALPATH__/public/ ;
# Force usage of https # Force usage of https
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
index index.php index.htm index.html; index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M; #client_max_body_size 50M;
try_files $uri $uri/ @kimai; try_files $uri $uri/ /index.php$is_args$args;
location ~ \.php { location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.3-fpm-__NAME__.sock; fastcgi_pass unix:/var/run/php/php7.3-fpm-__NAME__.sock;
@ -29,7 +31,3 @@ location __PATH__/ {
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
} }
location @kimai {
rewrite /(.*)$ /index.php?/$1 last;
}

View file

@ -358,7 +358,7 @@ request_terminate_timeout = 1d
; Chdir to this directory at the start. ; Chdir to this directory at the start.
; Note: relative path can be used. ; Note: relative path can be used.
; Default Value: current directory or / when chroot ; Default Value: current directory or / when chroot
chdir = __FINALPATH__ chdir = __FINALPATH__/public
; Redirect worker stdout and stderr into main error log. If not set, stdout and ; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs. ; stderr will be redirected to /dev/null according to FastCGI specs.