2023-03-24 17:05:30 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
let
|
2023-03-26 15:12:54 +02:00
|
|
|
domain = "ftp.${config.fsr.domain}";
|
2023-03-24 17:05:30 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
services.nginx.virtualHosts."${domain}" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
root = "/srv/ftp";
|
|
|
|
extraConfig = ''
|
|
|
|
autoindex on;
|
|
|
|
'';
|
|
|
|
locations."~/(klausuren|uebungen|skripte|abschlussarbeiten)".extraConfig = ''
|
2023-03-24 17:06:40 +01:00
|
|
|
allow 141.30.0.0/16;
|
|
|
|
allow 141.76.0.0/16;
|
|
|
|
allow 172.16.0.0/16;
|
|
|
|
deny all;
|
2023-03-24 17:05:30 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|