mirror of
https://github.com/YunoHost-Apps/syncthing_ynh.git
synced 2024-09-03 20:26:23 +02:00
clean nginx
This commit is contained in:
parent
3da966c982
commit
abd17eee3d
3 changed files with 6 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
|||
location PATHTOCHANGE/ {
|
||||
location __PATH__/ {
|
||||
proxy_set_header Host 127.0.0.1;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_pass http://127.0.0.1:PORTTOCHANGE/;
|
||||
proxy_pass http://127.0.0.1:__GUI_PORT__/;
|
||||
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
|
|
|
@ -107,6 +107,8 @@ sed -i "s@PATHTOCHANGE@$path_url@g" ../conf/nginx.conf
|
|||
sed -i "s@PORTTOCHANGE@$gui_port@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/syncthing.conf
|
||||
|
||||
ynh_add_nginx_config "gui_port"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
|
@ -62,8 +62,8 @@ sudo mv $sync_home $sync_home.old
|
|||
#=================================================
|
||||
ynh_print_info "Removing nginx web server configuration"
|
||||
|
||||
domain=$(sudo yunohost app setting syncthing domain)
|
||||
sudo rm /etc/nginx/conf.d/$domain.d/syncthing.conf
|
||||
# Remove the dedicated nginx config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
# Reload nginx and update ssowatch
|
||||
sudo systemctl reload nginx.service
|
||||
|
|
Loading…
Add table
Reference in a new issue