38 lines
779 B
Nix
38 lines
779 B
Nix
{
|
|
users.groups.ogdo = { members = [ "nginx" "jaina" ]; };
|
|
services.nginx = {
|
|
enable = true;
|
|
|
|
# ꙮ.run
|
|
virtualHosts."xn--xx8a.run" = {
|
|
listen = [
|
|
{
|
|
addr = "0.0.0.0";
|
|
port = 80;
|
|
}
|
|
{
|
|
port = 80;
|
|
addr = "[::]";
|
|
}
|
|
# deliberately avoid listening with https
|
|
];
|
|
|
|
rejectSSL = true;
|
|
root = "/srv/ogdo";
|
|
|
|
extraConfig = ''
|
|
error_page 404 /;
|
|
access_log /var/log/nginx/ogdo.log combined;
|
|
'';
|
|
|
|
locations."/" = { index = "/index.html"; };
|
|
locations."~ ^/.+" = {
|
|
root = "/srv/ogdo/served-files";
|
|
tryFiles = "$uri =404";
|
|
extraConfig = ''
|
|
default_type application/pdf;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|