mirror of
https://github.com/YunoHost-Apps/leantime_ynh.git
synced 2024-09-03 19:36:04 +02:00
Update nginx.conf
This commit is contained in:
parent
115c713b4c
commit
8ea56a786e
1 changed files with 31 additions and 8 deletions
|
@ -6,14 +6,15 @@ location __PATH__/ {
|
|||
|
||||
index index.php;
|
||||
|
||||
rewrite ^/?$ /index.php?act=dashboard.show;
|
||||
rewrite ^/([^/\.]+)/?$ /index.php?act=$1;
|
||||
rewrite ^/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1.$2;
|
||||
rewrite ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?act=$1.$2&id=$3;
|
||||
rewrite ^__PATH__/leantime(/.*)$ __PATH__$1 permanent;
|
||||
rewrite ^__PATH__/?$ __PATH__/index.php?act=dashboard.show last;
|
||||
rewrite ^__PATH__/([^/\.]+)/([^/\.]+)/?$ __PATH__/index.php?act=$1.$2 last;
|
||||
rewrite ^__PATH__/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ __PATH__/index.php?act=$1.$2&id=$3 last;
|
||||
rewrite ^__PATH__(/.*)$ $1 break;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
#try_files $uri $uri/ /index.php;
|
||||
#try_files $uri $uri/ __PATH__/index.php;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
|
@ -25,7 +26,29 @@ location __PATH__/ {
|
|||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
}
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
||||
location = __PATH__/resetPassword {
|
||||
rewrite ^(.*)$ __PATH__/index.php?resetPassword=true;
|
||||
}
|
||||
location = __PATH__/install {
|
||||
rewrite ^(.*)$ __PATH__/index.php?install=true;
|
||||
}
|
||||
location = __PATH__/update {
|
||||
rewrite ^(.*)$ __PATH__/index.php?update=true;
|
||||
}
|
||||
# assets, media
|
||||
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
|
||||
rewrite ^__PATH__/leantime(/.*)$ __PATH__$1 permanent;
|
||||
rewrite ^__PATH__(/.*)$ $1 break;
|
||||
expires 7d;
|
||||
access_log off;
|
||||
}
|
||||
# svg, fonts
|
||||
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
|
||||
rewrite ^__PATH__/leantime(/.*)$ __PATH__$1 permanent;
|
||||
rewrite ^__PATH__(/.*)$ $1 break;
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
expires 7d;
|
||||
access_log off;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue