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

Merge pull request #6 from YunoHost-Apps/fix-nginx

Fix nginx
This commit is contained in:
Kayou 2019-06-03 20:49:00 +02:00 committed by GitHub
commit 2676934eee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 4 deletions

View file

@ -2,7 +2,7 @@
location __PATH__/ {
# Path to source
root __FINALPATH__/ ;
alias __FINALPATH__/ ;
# Force usage of https
if ($scheme = http) {
@ -14,7 +14,14 @@ 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?$query_string;
location __PATH__/yunohost {
try_files $uri $uri/ index.php;
}
location __PATH__/ {
try_files $uri $uri/ @prettynoemiecms;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
@ -31,6 +38,6 @@ location __PATH__/ {
include conf.d/yunohost_panel.conf.inc;
}
location __PATH__/medias/ {
alias __FINALPATH__/sites/$host/medias/;
location @prettynoemiecms {
rewrite /(.*)$ __PATH__/index.php?/$1 last;
}

View file

@ -146,6 +146,9 @@ ynh_app_setting_delete --app=$app --key=skipped_uris
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$final_path/sites/$domain/config.json"
# Fix a bug where images can't be uploaded
ynh_replace_string --match_string="isMediaPathModified = true" --replace_string="" --target_file="$final_path/app/config/config.ini"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -130,6 +130,9 @@ ynh_backup_if_checksum_is_different --file="$final_path/sites/$domain/config.jso
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$final_path/sites/$domain/config.json"
# Fix a bug where images can't be uploaded
ynh_replace_string --match_string="isMediaPathModified = true" --replace_string="" --target_file="$final_path/app/config/config.ini"
#=================================================
# GENERIC FINALIZATION
#=================================================