FTP Config #27

Merged
rouven0 merged 4 commits from ftp into main 2023-03-31 15:36:06 +02:00
Showing only changes of commit 214c0d525d - Show all commits

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;
'';
};
}