1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/prettynoemiecms_ynh.git synced 2024-09-03 20:06:36 +02:00

Update nginx.conf

This commit is contained in:
Kayou 2019-06-03 17:44:21 +02:00 committed by GitHub
parent 4eabe5a507
commit adde6141b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@
location __PATH__/ { location __PATH__/ {
# Path to source # Path to source
root __FINALPATH__/ ; alias __FINALPATH__/ ;
# Force usage of https # Force usage of https
if ($scheme = http) { if ($scheme = http) {
@ -14,7 +14,13 @@ 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?$query_string; location /yunohost/sso/ {
try_files $uri $uri/ index.php;
}
location / {
try_files $uri $uri/ @prettynoemiecms;
}
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;
@ -31,6 +37,10 @@ location __PATH__/ {
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
} }
location @prettynoemiecms {
rewrite /(.*)$ /index.php?/$1 last;
}
location __PATH__/medias/ { location __PATH__/medias/ {
alias __FINALPATH__/sites/$host/medias/; alias __FINALPATH__/sites/$host/medias/;
} }