Add a dav server, related to #68

This commit is contained in:
Pierre Jaury
2016-11-30 14:02:36 +01:00
parent ab06365f09
commit fa912e7889
5 changed files with 65 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ events {
# Environment variables used in the configuration
env WEBMAIL;
env WEBDAV;
env EXPOSE_ADMIN;
http {
@@ -43,6 +44,7 @@ http {
# Load Lua variables
set_by_lua $webmail 'return os.getenv("WEBMAIL")';
set_by_lua $webdav 'return os.getenv("WEBDAV")';
set_by_lua $expose_admin 'return os.getenv("EXPOSE_ADMIN")';
# Actual logic
@@ -77,6 +79,16 @@ http {
}
}
location /webdav {
if ($webdav != none) {
proxy_pass http://webdav:5232;
}
if ($webdav = none) {
return 403;
}
}
location /.well-known/acme-challenge {
proxy_pass http://admin:8081;
}