forked from extern/egroupware
fixed requests to https://domain.com/ redirect to http://domain.com/egroupware/
redirects by Nginx need to use X-Forwarded-Proto too
This commit is contained in:
parent
77dba49f9e
commit
6df3c2f6a1
@ -8,6 +8,12 @@ upstream fpm {
|
||||
server egroupware:9000;
|
||||
}
|
||||
|
||||
# redirects needs to use X-Forwarded-Proto too
|
||||
map $http_x_forwarded_proto $redirectscheme {
|
||||
default $scheme;
|
||||
https https;
|
||||
}
|
||||
|
||||
server {
|
||||
access_log off;
|
||||
|
||||
@ -105,15 +111,15 @@ server {
|
||||
}
|
||||
# CalDAV & CardDAV autoconfig
|
||||
location ~ ^/.well-known/(caldav|carddav)$ {
|
||||
return 301 $scheme://$host/egroupware/groupdav.php/;
|
||||
return 301 $redirectscheme://$host/egroupware/groupdav.php/;
|
||||
}
|
||||
location ~ ^(/principals/users/.*)$ {
|
||||
return 301 $scheme://$host/egroupware/groupdav.php$1;
|
||||
return 301 $redirectscheme://$host/egroupware/groupdav.php$1;
|
||||
}
|
||||
# Nginx does NOT use index for OPTIONS requests breakng WebDAV
|
||||
# for Windows, which sends OPTIONS / and stalls on Nginx 405 response!
|
||||
# This also redirects all requests to root to EGroupware.
|
||||
location = / {
|
||||
return 301 $scheme://$host/egroupware/index.php;
|
||||
return 301 $redirectscheme://$host/egroupware/index.php;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user