mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix: avoid nginx error when webdav is missing
By default, nginx refuses to start if the upstream host is not found. Since the webdav upstream server is optional here, we want nginx to start even if the webdav upstream server is missing. The trick here is to put the upstream url in a variable first so that nginx will not check whether the upstream host exists on start and start anyway.
This commit is contained in:
parent
14b8d0fd64
commit
78c2649387
1 changed files with 5 additions and 1 deletions
|
|
@ -14,7 +14,11 @@ server {
|
|||
return 302 /webdav/;
|
||||
}
|
||||
location /webdav/ {
|
||||
proxy_pass $WEBDAV_BACKEND/;
|
||||
set $upstream $WEBDAV_BACKEND;
|
||||
# note: put the upstream host in a variable first so that nginx can
|
||||
# starts successfully even if the upstream hsot is not found.
|
||||
|
||||
proxy_pass $upstream/;
|
||||
# note: the trailing slash here matters!
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue