basic ftp config

This commit is contained in:
Rouven Seifert 2023-03-24 17:05:30 +01:00
parent 0ed90c8122
commit 214c0d525d
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09

21
modules/ftp.nix Normal file
View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
let
domain = "ftp.rfive.de";
in
{
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
root = "/srv/ftp";
extraConfig = ''
autoindex on;
'';
locations."~/(klausuren|uebungen|skripte|abschlussarbeiten)".extraConfig = ''
allow 141.30.0.0/16;
allow 141.76.0.0/16;
allow 172.16.0.0/16;
deny all;
'';
};
}