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

31 lines
1 KiB
Nginx Configuration File
Raw Normal View History

2022-07-20 12:04:29 +02:00
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
2024-02-14 14:13:22 +01:00
proxy_pass http://127.0.0.1:__PORT__;
2022-07-21 08:24:29 +02:00
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2022-07-20 12:04:29 +02:00
2022-07-21 08:24:29 +02:00
# Nomad blocking queries will remain open for a default of 5 minutes.
# Increase the proxy timeout to accommodate this timeout with an
# additional grace period.
proxy_read_timeout 310s;
2022-07-20 12:04:29 +02:00
2022-07-21 08:24:29 +02:00
# Nomad log streaming uses streaming HTTP requests. In order to
# synchronously stream logs from Nomad to NGINX to the browser
# proxy buffering needs to be turned off.
proxy_buffering off;
2022-07-20 12:04:29 +02:00
2022-07-21 08:24:29 +02:00
# The Upgrade and Connection headers are used to establish
# a WebSockets connection.
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# The default Origin header will be the proxy address, which
# will be rejected by Nomad. It must be rewritten to be the
# host address instead.
proxy_set_header Origin "${scheme}://${proxy_host}";
2022-07-20 12:04:29 +02:00
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}