2019-08-07 21:40:26 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2020-09-30 23:30:40 +00:00
|
|
|
{
|
2019-08-07 21:40:26 +00:00
|
|
|
services = {
|
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts."mathechor.de" = {
|
|
|
|
serverAliases = [ "www.mathechor.de" ];
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
|
|
|
root = "/var/www/mathechor/public";
|
|
|
|
index = "index.html";
|
|
|
|
extraConfig =
|
|
|
|
"location ~* .(otf)$ {add_header Access-Control-Allow-Origin *;}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
virtualHosts."intern.mathechor.de" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
2020-10-04 14:24:18 +00:00
|
|
|
basicAuthFile = pkgs.privateFile "basic-auth/mathechor.de";
|
2019-08-07 21:40:26 +00:00
|
|
|
locations = {
|
|
|
|
"/" = {
|
|
|
|
root = "/var/www/mathechor/intern";
|
|
|
|
index = "index.html";
|
|
|
|
};
|
|
|
|
"/mathechor.ics" = {
|
2020-09-30 23:30:40 +00:00
|
|
|
proxyPass = pkgs.privateValue "" "mathechor-ics";
|
2019-08-07 21:40:26 +00:00
|
|
|
extraConfig = ''
|
|
|
|
proxy_ssl_name cloud.mathechor.de;
|
|
|
|
proxy_ssl_server_name on;
|
2021-11-08 22:12:05 +00:00
|
|
|
set $args export;
|
2019-08-07 21:40:26 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|