1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cheky_ynh.git synced 2024-09-03 18:16:00 +02:00

[enh] fix nginx 'alias_traversal'

This commit is contained in:
Gofannon 2018-07-31 00:16:42 +02:00
parent 83887521fc
commit f3d71c0110
2 changed files with 6 additions and 11 deletions

View file

@ -1,13 +1,15 @@
location __PATH__ {
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __FINALPATH__/ ;
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
# Example PHP configuration (remove if not used)
### Example PHP configuration (remove it if not used)
index index.php;
# Common parameter to increase upload size limit in conjuction with dedicated php-fpm file
@ -18,20 +20,13 @@ location __PATH__ {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock;
# If you don't use a dedicated fpm config for your app,
# use a general fpm pool.
# This is to be used INSTEAD of line above
# Don't forget to adjust scripts install/upgrade/remove/backup accordingly
#
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
# PHP configuration end
### End of PHP configuration part
# Very important security restriction
# See https://forum.cheky.net/information-sur-message-avertissement-securite-t553-p1.html#p2127

View file

@ -27,7 +27,7 @@
}
],
"requirements": {
"yunohost": ">> 2.6.4"
"yunohost": ">> 2.7.14"
},
"multi_instance": true,
"services": [