2022-04-25 18:09:22 +00:00
|
|
|
{ config, ... }: {
|
2022-04-15 08:27:53 +00:00
|
|
|
services.nginx.virtualHosts."hydra.chir.rs" = {
|
|
|
|
sslCertificate = "/var/lib/acme/chir.rs/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/chir.rs/key.pem";
|
|
|
|
locations."/" = {
|
2022-04-26 06:19:59 +00:00
|
|
|
proxyPass = "https://hydra.int.chir.rs";
|
2022-04-15 08:27:53 +00:00
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
2022-04-26 07:19:57 +00:00
|
|
|
extraConfig = ''
|
|
|
|
proxy_ssl_server_name on;
|
|
|
|
proxy_ssl_name $host;
|
|
|
|
'';
|
2022-04-15 08:27:53 +00:00
|
|
|
};
|
2022-04-25 16:57:59 +00:00
|
|
|
services.nginx.virtualHosts."mastodon.chir.rs" = {
|
2022-04-26 07:06:57 +00:00
|
|
|
root = "${config.services.mastodon.package}/public/";
|
2022-04-25 16:57:59 +00:00
|
|
|
sslCertificate = "/var/lib/acme/chir.rs/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/chir.rs/key.pem";
|
|
|
|
locations."/" = {
|
2022-04-26 07:06:57 +00:00
|
|
|
tryFiles = "$uri @proxy";
|
|
|
|
};
|
|
|
|
locations."@proxy" = {
|
2022-04-26 07:47:38 +00:00
|
|
|
proxyPass = "http://mastodon.int.chir.rs";
|
2022-04-25 16:57:59 +00:00
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
2022-04-26 07:19:57 +00:00
|
|
|
extraConfig = ''
|
|
|
|
proxy_ssl_server_name on;
|
|
|
|
proxy_ssl_name $host;
|
|
|
|
'';
|
2022-04-25 16:57:59 +00:00
|
|
|
};
|
2022-04-15 08:27:53 +00:00
|
|
|
}
|