2022-07-30 23:27:40 +02:00
|
|
|
upstream jellyfin {
|
|
|
|
server {{ env "NOMAD_UPSTREAM_ADDR_jellyfin" }};
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream zigbee2mqtt {
|
|
|
|
server {{ env "NOMAD_UPSTREAM_ADDR_zigbee2mqtt" }};
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream home-assistant {
|
|
|
|
server {{ env "NOMAD_UPSTREAM_ADDR_home-assistant" }};
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream syncthing {
|
|
|
|
server {{ env "NOMAD_UPSTREAM_ADDR_syncthing" }};
|
|
|
|
}
|
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
upstream influx {
|
|
|
|
server {{ env "NOMAD_UPSTREAM_ADDR_influx" }};
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream grafana {
|
|
|
|
server {{ env "NOMAD_UPSTREAM_ADDR_grafana" }};
|
|
|
|
}
|
|
|
|
|
|
|
|
upstream mainsail {
|
|
|
|
server {{ env "NOMAD_UPSTREAM_ADDR_mainsail" }};
|
2022-07-30 23:27:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2023-04-23 23:03:20 +02:00
|
|
|
listen 80;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server_name jellyfin.in.redalder.org;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
|
|
|
include /local/security.conf;
|
|
|
|
|
|
|
|
client_max_body_size 100M;
|
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
location / {
|
2022-07-30 23:27:40 +02:00
|
|
|
# Proxy main Jellyfin traffic
|
|
|
|
|
|
|
|
# The / at the end is significant.
|
|
|
|
# https://www.acunetix.com/blog/articles/a-fresh-look-on-reverse-proxy-related-attacks/
|
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
proxy_pass http://jellyfin/;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
|
|
|
proxy_pass_request_headers on;
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
|
|
|
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_set_header X-Forwarded-Host $http_host;
|
|
|
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection $http_connection;
|
|
|
|
|
|
|
|
# Disable buffering when the nginx proxy gets very resource heavy upon streaming
|
|
|
|
proxy_buffering off;
|
|
|
|
}
|
2023-04-23 23:03:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server_name syncthing.in.redalder.org;
|
|
|
|
|
|
|
|
include /local/security.conf;
|
|
|
|
|
|
|
|
location / {
|
2022-07-30 23:27:40 +02:00
|
|
|
include /local/headers.conf;
|
|
|
|
|
|
|
|
proxy_pass http://syncthing/;
|
|
|
|
}
|
2023-04-23 23:03:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
|
|
|
|
server_name hass.in.redalder.org;
|
|
|
|
|
|
|
|
include /local/security.conf;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
location / {
|
2022-07-30 23:27:40 +02:00
|
|
|
include /local/headers.conf;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
proxy_pass http://home-assistant/;
|
|
|
|
|
|
|
|
# Disable buffering when the nginx proxy gets very resource heavy upon streaming
|
|
|
|
proxy_buffering off;
|
2022-07-30 23:27:40 +02:00
|
|
|
}
|
2023-04-23 23:03:20 +02:00
|
|
|
}
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
|
|
|
|
server_name zigbee2mqtt.in.redalder.org;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
include /local/security.conf;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
include /local/headers.conf;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
proxy_pass http://zigbee2mqtt/;
|
2022-07-30 23:27:40 +02:00
|
|
|
}
|
2023-04-23 23:03:20 +02:00
|
|
|
}
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server_name grafana.in.redalder.org;
|
|
|
|
|
|
|
|
# Grafana really doesn't like that CSP policy
|
|
|
|
# include /local/security.conf;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
include /local/headers.conf;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
proxy_pass http://grafana/;
|
2022-07-30 23:27:40 +02:00
|
|
|
}
|
2023-04-23 23:03:20 +02:00
|
|
|
}
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
|
|
|
|
server_name influx.in.redalder.org;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
# Influx doesn't like it either
|
|
|
|
# include /local/security.conf;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
include /local/headers.conf;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
proxy_pass http://influx/;
|
2022-07-30 23:27:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server_name mainsail.in.redalder.org;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
# Influx doesn't like it either
|
|
|
|
# include /local/security.conf;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
location / {
|
|
|
|
include /local/headers.conf;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
proxy_pass http://mainsail/;
|
|
|
|
}
|
|
|
|
}
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server {
|
|
|
|
listen 80;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
server_name _;
|
|
|
|
include /local/security.conf;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
location / {
|
|
|
|
return 404;
|
|
|
|
}
|
|
|
|
}
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
# server {
|
|
|
|
# listen 443;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
# server_name _;
|
2022-07-30 23:27:40 +02:00
|
|
|
|
2023-04-23 23:03:20 +02:00
|
|
|
# include /local/security.conf;
|
|
|
|
|
|
|
|
# location / {
|
|
|
|
# return 404;
|
|
|
|
# }
|
|
|
|
# }
|