diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-06 15:34:06 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-06 15:34:06 +0100 |
| commit | d1b8c94b7cb2e598643c742c222ac50d5917b562 (patch) | |
| tree | 873a432b7447556110aefc8821b9e258975ec4fe /custom | |
| parent | f27fdaaa6b5e57ae763b76a8ac6e55fed3bcb2a4 (diff) | |
| download | nixos-d1b8c94b7cb2e598643c742c222ac50d5917b562.tar nixos-d1b8c94b7cb2e598643c742c222ac50d5917b562.tar.gz nixos-d1b8c94b7cb2e598643c742c222ac50d5917b562.tar.bz2 nixos-d1b8c94b7cb2e598643c742c222ac50d5917b562.tar.xz nixos-d1b8c94b7cb2e598643c742c222ac50d5917b562.zip | |
FTP over WebDAV
Diffstat (limited to 'custom')
| -rw-r--r-- | custom/ymir-nginx.nix | 35 |
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 | } |
