mirror of
https://github.com/YunoHost-Apps/prettynoemiecms_ynh.git
synced 2024-09-03 20:06:36 +02:00
Fix admin panel nginx conf
This commit is contained in:
parent
b3ff3782c9
commit
f799a9adf6
1 changed files with 6 additions and 17 deletions
|
@ -2,7 +2,7 @@
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/ ;
|
root __FINALPATH__/ ;
|
||||||
|
|
||||||
# Force usage of https
|
# Force usage of https
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
|
@ -14,7 +14,7 @@ location __PATH__/ {
|
||||||
# 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/ index.php;
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||||
|
@ -27,21 +27,10 @@ location __PATH__/ {
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^__PATH__/(.*)$ {
|
|
||||||
if ($request_filename !~ "-l"){
|
|
||||||
set $rule_1 1$rule_1;
|
|
||||||
}
|
|
||||||
if (!-f $request_filename){
|
|
||||||
set $rule_1 2$rule_1;
|
|
||||||
}
|
|
||||||
if (!-d $request_filename){
|
|
||||||
set $rule_1 3$rule_1;
|
|
||||||
}
|
|
||||||
if ($rule_1 = "321"){
|
|
||||||
rewrite __PATH__/(.*) __PATH__/index.php?$1 last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location __PATH__/medias/ {
|
||||||
|
alias __FINALPATH__/sites/$host/medias/;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue