summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
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}