Add jichan.org API routes, minor tweaks
This commit is contained in:
parent
51c5d2bc2c
commit
25cb4f70ec
2 changed files with 22 additions and 8 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
with import ../../../../modules/tailscale/default.nix;
|
||||||
let host = "jichan.org"; in {
|
let host = "jichan.org"; in {
|
||||||
services.nginx.virtualHosts."www.${host}" = {
|
services.nginx.virtualHosts."www.${host}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
@ -11,13 +12,28 @@ let host = "jichan.org"; in {
|
||||||
error_page 502 /502.html;
|
error_page 502 /502.html;
|
||||||
'';
|
'';
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/".proxyPass = "http://${elnuhub}:3334";
|
||||||
proxyPass = with import ../../../../modules/tailscale/default.nix; "http://${elnuhub}:3334";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
"/502.html".root = "${./502}";
|
"/502.html".root = "${./502}";
|
||||||
"/logo.svg".root = "${./502}";
|
"/logo.svg".root = "${./502}";
|
||||||
"/missing.min.css".root = "${../shared/502}";
|
"/missing.min.css".root = "${../shared/502}";
|
||||||
|
|
||||||
|
# Formerly tatoeba.elnu.com
|
||||||
|
# https://git.elnu.com/ElnuDev/tatoeba-api
|
||||||
|
"/api/tatoeba/" = {
|
||||||
|
proxyPass = "http://${elnuhub}:3001";
|
||||||
|
extraConfig = ''
|
||||||
|
rewrite ^/api/tatoeba/(.*) /$1 break;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Formerly images.elnu.com
|
||||||
|
# https://git.elnu.com/ElnuDev/image-api
|
||||||
|
"/api/images/" = {
|
||||||
|
proxyPass = "http://${elnuhub}:3002";
|
||||||
|
extraConfig = ''
|
||||||
|
rewrite ^/api/images/(.*) /$1 break;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
|
with import ../../../../modules/tailscale/default.nix;
|
||||||
let host = "tegakituesday.com"; in {
|
let host = "tegakituesday.com"; in {
|
||||||
services.nginx.virtualHosts."www.${host}" = {
|
services.nginx.virtualHosts."www.${host}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
@ -11,10 +12,7 @@ let host = "tegakituesday.com"; in {
|
||||||
error_page 502 /502.html;
|
error_page 502 /502.html;
|
||||||
'';
|
'';
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/".proxyPass = "http://${elnuhub}:3335";
|
||||||
proxyPass = with import ../../../../modules/tailscale/default.nix; "http://${elnuhub}:3335";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
"/502.html".root = "${./502}";
|
"/502.html".root = "${./502}";
|
||||||
"/mascot.png".root = "${./502}";
|
"/mascot.png".root = "${./502}";
|
||||||
"/missing.min.css".root = "${../shared/502}";
|
"/missing.min.css".root = "${../shared/502}";
|
||||||
|
|
Loading…
Add table
Reference in a new issue