1
0
Fork 0
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:
Kayou 2019-06-03 17:06:26 +02:00 committed by GitHub
parent b3ff3782c9
commit f799a9adf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@
location __PATH__/ {
# Path to source
alias __FINALPATH__/ ;
root __FINALPATH__/ ;
# Force usage of https
if ($scheme = http) {
@ -14,7 +14,7 @@ location __PATH__/ {
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
client_max_body_size 50M;
try_files $uri $uri/ index.php;
try_files $uri $uri/ /index.php?$query_string;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
@ -27,21 +27,10 @@ location __PATH__/ {
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 conf.d/yunohost_panel.conf.inc;
}
location __PATH__/medias/ {
alias __FINALPATH__/sites/$host/medias/;
}