You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
{ enableSSL, ... }:
|
|
|
|
let host = "jichan.org"; in {
|
|
services.nginx.virtualHosts."www.${host}" = {
|
|
forceSSL = enableSSL;
|
|
enableACME = enableSSL;
|
|
globalRedirect = host;
|
|
};
|
|
services.nginx.virtualHosts."${host}" = {
|
|
forceSSL = enableSSL;
|
|
enableACME = enableSSL;
|
|
extraConfig = ''
|
|
error_page 502 /502.html;
|
|
'';
|
|
locations = {
|
|
"/".proxyPass = "http://elnuhub:3334";
|
|
"/502.html".root = "${./502}";
|
|
"/logo.svg".root = "${./502}";
|
|
"/missing.min.css".root = "${../shared/502}";
|
|
|
|
# Formerly tatoeba.elnu.com
|
|
# https://git.elnu.com/jichan.org/apis
|
|
"/api/tatoeba/" = {
|
|
proxyPass = "http://localhost:3001";
|
|
extraConfig = ''
|
|
rewrite ^/api/tatoeba/(.*) /$1 break;
|
|
'';
|
|
};
|
|
|
|
# Formerly images.elnu.com
|
|
# https://git.elnu.com/jichan.org/apis
|
|
"/api/images/" = {
|
|
proxyPass = "http://localhost:3002";
|
|
extraConfig = ''
|
|
rewrite ^/api/images/(.*) /$1 break;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
} |