summaryrefslogtreecommitdiff
path: root/custom/ymir-nginx.nix
diff options
context:
space:
mode:
Diffstat (limited to 'custom/ymir-nginx.nix')
-rw-r--r--custom/ymir-nginx.nix35
1 files changed, 33 insertions, 2 deletions
diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix
index a1de81c3..dcee84fa 100644
--- a/custom/ymir-nginx.nix
+++ b/custom/ymir-nginx.nix
@@ -175,8 +175,6 @@ in {
175 listen [::]:443 ssl; 175 listen [::]:443 ssl;
176 server_name ~^(.*\.)?bragi\.(yggdrasil\.li|141\.li)$; 176 server_name ~^(.*\.)?bragi\.(yggdrasil\.li|141\.li)$;
177 177
178 include ${acme};
179
180 location / { 178 location / {
181 auth_basic "Reverse proxy to bragi"; 179 auth_basic "Reverse proxy to bragi";
182 auth_basic_user_file /srv/www/bragi/htpasswd; 180 auth_basic_user_file /srv/www/bragi/htpasswd;
@@ -184,6 +182,39 @@ in {
184 proxy_pass http://bragi.asgard.yggdrasil/; 182 proxy_pass http://bragi.asgard.yggdrasil/;
185 } 183 }
186 } 184 }
185
186 server {
187 listen *:80;
188 listen [::]:80;
189 server_name ~^ftp\.(yggdrasil\.li|141\.li|praseodym\.org)$;
190
191 include ${acme};
192
193 location / {
194 return 301 https://$host$request_uri;
195 }
196 }
197
198 server {
199 listen *:443 ssl;
200 listen [::]:443 ssl;
201
202 server_name ~^ftp\.(yggdrasil\.li|141\.li|praseodym\.org)$;
203
204 client_body_temp_path /tmp/webdav;
205
206 location / {
207 root /srv/ftp/$remote_user;
208 autoindex on;
209
210 auth_basic "FTP over WebDAV";
211 auth_basic_user_file /srv/ftp.htpasswd;
212
213 dav_methods PUT DELETE MKCOL COPY MOVE;
214 create_full_put_path on;
215 dav_access user:rw group:r all:r;
216 }
217 }
187 ''; 218 '';
188 }; 219 };
189} 220}