check .well-known presence upstream
this is required for apps like nextcloud which have caldav/cardav routes
This commit is contained in:
@@ -136,10 +136,20 @@ server {
|
||||
internal;
|
||||
}
|
||||
|
||||
location @wellknown-upstream {
|
||||
<% if ( endpoint === 'admin' ) { %>
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
<% } else if ( endpoint === 'app' ) { %>
|
||||
proxy_pass http://127.0.0.1:<%= port %>;
|
||||
<% } else if ( endpoint === 'redirect' ) { %>
|
||||
return 302 https://<%= redirectTo %>$request_uri;
|
||||
<% } %>
|
||||
}
|
||||
|
||||
# user defined .well-known resources
|
||||
# alias means only the part after matched location is appended (unlike root)
|
||||
location /.well-known/ {
|
||||
alias /home/yellowtent/boxdata/well-known/$host/;
|
||||
location ~ ^/.well-known/(.*)$ {
|
||||
root /home/yellowtent/boxdata/well-known/$host;
|
||||
try_files /$1 @wellknown-upstream;
|
||||
}
|
||||
|
||||
location / {
|
||||
|
||||
Reference in New Issue
Block a user