1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/httpsh_ynh.git synced 2024-09-03 19:25:55 +02:00
httpsh_ynh/conf/nginx.conf

23 lines
606 B
Nginx Configuration File
Raw Normal View History

2023-09-21 15:11:59 +02:00
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
2023-09-21 16:29:54 +02:00
# This allows to pass arguments to the httpsh script
set $path $1;
set $req $path;
if ($path ~* ^(\/ws)?$) {
set $req $path?arg=$remote_addr;
}
2023-09-21 15:11:59 +02:00
2023-09-21 16:29:54 +02:00
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
2023-09-21 15:11:59 +02:00
2023-09-21 16:29:54 +02:00
proxy_pass http://127.0.0.1:__PORT__$req;
2023-09-21 15:11:59 +02:00
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}