From 2faf437cc5c14ac5bcc9effd5c962145d05d8e3c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 16 Mar 2017 14:51:26 +0100 Subject: Reverse proxy to bragi --- custom/ymir-nginx.nix | 23 +++++++++++++++++++++++ ymir.nix | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 46256328..0d0ed8ce 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix @@ -136,6 +136,29 @@ in { uwsgi_modifier1 9; } } + + server { + server *:80; + server [::]:80; + server_name ~^(.*\.)?bragi\.(yggdrasil\.li|141\.li)$; + + return 301 https://$host$request_uri; + } + + server { + server *:443 ssl; + server [::]:443 ssl; + server_name ~^(.*\.)?bragi\.(yggdrasil\.li|141\.li)$; + + include ${acme}; + + location / { + auth_basic "Reverse proxy to bragi"; + auth_basic_user_file /srv/www/bragi/htpasswd; + + proxy_pass http://bragi.asgard.yggdrasil/; + } + } ''; }; } diff --git a/ymir.nix b/ymir.nix index 74eb1a39..0d1b69d4 100644 --- a/ymir.nix +++ b/ymir.nix @@ -14,9 +14,9 @@ let }; }; myDomains = ["dirty-haskell.org" "www.dirty-haskell.org" "lists.dirty-haskell.org" "l.dirty-haskell.org" - "files.141.li" "f.141.li" "ymir.141.li" "141.li" "www.141.li" "lists.141.li" "l.141.li" + "files.141.li" "f.141.li" "ymir.141.li" "141.li" "www.141.li" "lists.141.li" "l.141.li" "bragi.141.li" "ymir.xmpp.li" "xmpp.li" "www.xmpp.li" "lists.xmpp.li" "l.xmpp.li" - "files.yggdrasil.li" "f.yggdrasil.li" "ymir.yggdrasil.li" "git.yggdrasil.li" "www.yggdrasil.li" "yggdrasil.li" "lists.yggdrasil.li" "l.yggdrasil.li" + "files.yggdrasil.li" "f.yggdrasil.li" "ymir.yggdrasil.li" "git.yggdrasil.li" "www.yggdrasil.li" "yggdrasil.li" "lists.yggdrasil.li" "l.yggdrasil.li" "bragi.yggdrasil.li" "files.praseodym.org" "f.praseodym.org" "ymir.praseodym.org" "praseodym.org" "www.praseodym.org" "lists.praseodym.org" "l.praseodym.org" "ymir.kleen.li" "kleen.li" "www.kleen.li" "ymir.nights.email" "nights.email" "www.nights.email" -- cgit v1.2.3