hosts/vps1: use mesh domains for upstreams
This commit is contained in:
@@ -82,14 +82,32 @@ in
|
||||
maxSize = "100m";
|
||||
};
|
||||
};
|
||||
resolver.addresses = [ "100.100.100.100" ];
|
||||
upstreams = {
|
||||
jellyfin.servers = {
|
||||
"library.mesh.vimium.net:8096" = {
|
||||
fail_timeout = "30s";
|
||||
};
|
||||
};
|
||||
open-webui.servers = {
|
||||
"library.mesh.vimium.net:8081" = {
|
||||
fail_timeout = "30s";
|
||||
};
|
||||
};
|
||||
skycam.servers = {
|
||||
"skycam.mesh.vimium.net:1984" = {
|
||||
fail_timeout = "30s";
|
||||
};
|
||||
};
|
||||
};
|
||||
virtualHosts = {
|
||||
## Static sites
|
||||
## Proxied sites
|
||||
"chat.ai.vimium.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = nginxErrorPages + nginxEdgeHeaders;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8001";
|
||||
proxyPass = "http://open-webui";
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
@@ -112,24 +130,19 @@ in
|
||||
"jellyfin.vimium.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = nginxErrorPages + nginxEdgeHeaders;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8000";
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_set_header Range $http_range;
|
||||
proxy_set_header If-Range $http_if_range;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
extraConfig = nginxEdgeHeaders + ''
|
||||
error_page 503 /maintenance.html;
|
||||
'';
|
||||
locations."/maintenance.html" = {
|
||||
root = "/var/www/html";
|
||||
extraConfig = "internal; default_type text/html;";
|
||||
};
|
||||
locations."/" = {
|
||||
return = "503";
|
||||
};
|
||||
};
|
||||
|
||||
## Static sites
|
||||
"jdholt.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
@@ -140,11 +153,7 @@ in
|
||||
};
|
||||
locations."/skycam/snapshot.jpg" = {
|
||||
extraConfig = ''
|
||||
set $backend "skycam.mesh.vimium.net:1984";
|
||||
|
||||
resolver 100.100.100.100;
|
||||
|
||||
proxy_pass http://$backend/api/frame.jpeg?src=rpicam;
|
||||
proxy_pass http://skycam/api/frame.jpeg?src=rpicam;
|
||||
proxy_cache skycam_cache;
|
||||
proxy_cache_valid any 10s;
|
||||
proxy_ignore_headers Cache-Control Expires Set-Cookie;
|
||||
@@ -181,6 +190,7 @@ in
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
## Redirects
|
||||
// (mkRedirect "h0lt.com" "jdholt.com")
|
||||
// (mkRedirect "jordanholt.xyz" "jdholt.com")
|
||||
|
||||
Reference in New Issue
Block a user