diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-05 23:42:35 +0100 | 
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-05 23:42:35 +0100 | 
| commit | 0530526f816c75620c8067db668a52cf8a205a1f (patch) | |
| tree | 40b5dd904406835c6422259cf1ded8a5bb28ac7f /custom | |
| parent | 56b56a47865cd95e19161bab8bec272a7d0ba605 (diff) | |
| download | nixos-0530526f816c75620c8067db668a52cf8a205a1f.tar nixos-0530526f816c75620c8067db668a52cf8a205a1f.tar.gz nixos-0530526f816c75620c8067db668a52cf8a205a1f.tar.bz2 nixos-0530526f816c75620c8067db668a52cf8a205a1f.tar.xz nixos-0530526f816c75620c8067db668a52cf8a205a1f.zip | |
listen for plain webdav
Diffstat (limited to 'custom')
| -rw-r--r-- | custom/ymir-nginx.nix | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 701a1108..b61c448c 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; | 
| @@ -186,6 +184,8 @@ in { | |||
| 186 | } | 184 | } | 
| 187 | 185 | ||
| 188 | server { | 186 | server { | 
| 187 | listen *:80; | ||
| 188 | listen [::]:80; | ||
| 189 | listen *:443 ssl; | 189 | listen *:443 ssl; | 
| 190 | listen [::]:443 ssl; | 190 | listen [::]:443 ssl; | 
| 191 | 191 | ||
| @@ -194,6 +194,10 @@ in { | |||
| 194 | include ${acme}; | 194 | include ${acme}; | 
| 195 | 195 | ||
| 196 | location ~ ^/(.+?)(/.*)?$ { | 196 | location ~ ^/(.+?)(/.*)?$ { | 
| 197 | if ($scheme = http) { | ||
| 198 | return 301 https://$server_name$request_uri; | ||
| 199 | } | ||
| 200 | |||
| 197 | alias /srv/www/webdav/$1$2; | 201 | alias /srv/www/webdav/$1$2; | 
| 198 | autoindex on; | 202 | autoindex on; | 
| 199 | 203 | ||
