1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/UMS_ynh.git synced 2024-10-01 13:35:01 +02:00

Nginx port_web

This commit is contained in:
Krakinou 2021-04-10 19:29:50 +02:00
parent 7ffa1ccd3c
commit eecd1aaa08
6 changed files with 12 additions and 13 deletions

View file

@ -7,21 +7,20 @@
; Manifest
domain="domain.tld" (DOMAIN)
is_public=1 (PUBLIC|public=1|private=0)
port="666" (PORT)
; Checks
pkg_linter=1
#Only work w/ root domain
setup_sub_dir=0
setup_root=1
setup_nourl=0
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=CommitHash
backup_restore=1
setup_private=0
setup_public=0
upgrade=0
upgrade=0 from_commit=CommitHash
backup_restore=
multi_instance=0
port_already_use=1
change_url=1
port_already_use=0
change_url=0
;;; Options
Email=
Notification=none

View file

@ -10,7 +10,7 @@ location __PATH__/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
more_set_headers "X-Frame-Options: SAMEORIGIN";
proxy_pass http://localhost:__PORT__/;
proxy_pass http://localhost:__PORT_WEB__/;
proxy_set_header Host $host;
# Force usage of https

View file

@ -164,7 +164,7 @@ ynh_script_progression --message="Configuring NGINX web server..." --time --weig
### `ynh_add_nginx_config` will use the file conf/nginx.conf
# Create a dedicated NGINX config
ynh_add_nginx_config
ynh_add_nginx_config "port_web"
#=================================================
@ -218,9 +218,9 @@ ynh_add_systemd_config
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/some_config_file"
### ynh_store_file_checksum --file="$final_path/some_config_file"
mkdir -p "/home/$app/.config/UMS"
ynh_add_config --template="UMS.conf" --destination="/home/$app/.config/UMS/"
ynh_add_config --template="WEB.conf" --destination="/home/$app/.config/UMS/"
ynh_add_config --template="VirtualFolders.conf" --destination="/home/$app/.config/UMS/"
ynh_add_config --template="UMS.conf.default" --destination="/home/$app/.config/UMS/UMS.conf"
ynh_add_config --template="WEB.conf.default" --destination="/home/$app/.config/UMS/WEB.conf"
ynh_add_config --template="VirtualFolders.conf.default" --destination="/home/$app/.config/UMS/VirtualFolders.conf"
chown -R $app:$app "/home/$app/.config"
chmod -R 700 "/home/$app/.config"
#chmod 600 "/home/$app/.config/UMS/*"