summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-16 14:51:26 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-16 14:51:26 +0100
commit2faf437cc5c14ac5bcc9effd5c962145d05d8e3c (patch)
tree76b28ab9fcaf983032e9323bdbd417b8c44cd566 /custom
parentd10228b29b05a090556bc6b0486a0a2e674ed139 (diff)
downloadnixos-2faf437cc5c14ac5bcc9effd5c962145d05d8e3c.tar
nixos-2faf437cc5c14ac5bcc9effd5c962145d05d8e3c.tar.gz
nixos-2faf437cc5c14ac5bcc9effd5c962145d05d8e3c.tar.bz2
nixos-2faf437cc5c14ac5bcc9effd5c962145d05d8e3c.tar.xz
nixos-2faf437cc5c14ac5bcc9effd5c962145d05d8e3c.zip
Reverse proxy to bragi
Diffstat (limited to 'custom')
-rw-r--r--custom/ymir-nginx.nix23
1 files changed, 23 insertions, 0 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 {
136 uwsgi_modifier1 9; 136 uwsgi_modifier1 9;
137 } 137 }
138 } 138 }
139
140 server {
141 server *:80;
142 server [::]:80;
143 server_name ~^(.*\.)?bragi\.(yggdrasil\.li|141\.li)$;
144
145 return 301 https://$host$request_uri;
146 }
147
148 server {
149 server *:443 ssl;
150 server [::]:443 ssl;
151 server_name ~^(.*\.)?bragi\.(yggdrasil\.li|141\.li)$;
152
153 include ${acme};
154
155 location / {
156 auth_basic "Reverse proxy to bragi";
157 auth_basic_user_file /srv/www/bragi/htpasswd;
158
159 proxy_pass http://bragi.asgard.yggdrasil/;
160 }
161 }
139 ''; 162 '';
140 }; 163 };
141} 164}