1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opensondage_ynh.git synced 2024-09-03 19:46:28 +02:00

Merge pull request #29 from YunoHost-Apps/testing

Testing
This commit is contained in:
Maniack Crudelis 2018-04-10 20:06:10 +02:00 committed by GitHub
commit c52321986b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 6 deletions

View file

@ -16,13 +16,8 @@
upgrade=1
backup_restore=1
multi_instance=1
wrong_user=1
wrong_path=1
incorrect_path=1
corrupt_source=0
fail_download_source=0
port_already_use=0
final_path_already_use=0
;;; Levels
Level 1=auto
Level 2=auto

View file

@ -1,4 +1,6 @@
location __PATH__ {
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
alias __FINALPATH__/;
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;

View file

@ -86,6 +86,15 @@ ynh_setup_source "$final_path"
# NGINX CONFIGURATION
#=================================================
if [ "$path_url" == "/" ]
then
# ynh panel is only for non-root installs
ynh_replace_string " include conf.d/" " #include conf.d/" "../conf/nginx.conf"
else
# add rewrite for alias_traversal protection
ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf"
fi
# Create a dedicated nginx config
ynh_add_nginx_config

View file

@ -107,6 +107,15 @@ ynh_setup_source "$final_path"
# NGINX CONFIGURATION
#=================================================
if [ "$path_url" == "/" ]
then
# ynh panel is only for non-root installs
ynh_replace_string " include conf.d/" " #include conf.d/" "../conf/nginx.conf"
else
# add rewrite for alias_traversal protection
ynh_replace_string "^#sub_path_only" "" "../conf/nginx.conf"
fi
# Create a dedicated nginx config
ynh_add_nginx_config