From 62885ad0ddd74c92437c6074b8a8167a60095437 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 18 Jul 2015 12:33:29 +0200 Subject: 1 tv cd: make public_html available on the Internet --- 1systems/tv/cd.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to '1systems') diff --git a/1systems/tv/cd.nix b/1systems/tv/cd.nix index 1252f16c4..4826a0684 100644 --- a/1systems/tv/cd.nix +++ b/1systems/tv/cd.nix @@ -48,6 +48,20 @@ with lib; tv.iptables.input-internet-accept-new-tcp = singleton "http"; tv.nginx.servers.cgit.server-names = singleton "cgit.cd.viljetic.de"; } + { + # TODO make public_html also available to cd, cd.retiolum (AKA default) + imports = [ + ../../3modules/tv/iptables.nix + ../../3modules/tv/nginx.nix + ]; + tv.iptables.input-internet-accept-new-tcp = singleton "http"; + tv.nginx.servers.public_html = { + server-names = singleton "cd.viljetic.de"; + locations = singleton (nameValuePair "~ ^/~(.+?)(/.*)?\$" '' + alias /home/$1/public_html$2; + ''); + }; + } { imports = [ ../../3modules/tv/retiolum.nix ]; tv.retiolum = { -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/45100000.lock: No such file or directory (2)