Fix nginx rewrite redirects when box is behind port masquerading

This commit is contained in:
Toilal 2015-03-05 11:43:47 +01:00
parent e2fa01e0cf
commit 22091f8a97
2 changed files with 5 additions and 5 deletions

View File

@ -8,9 +8,9 @@
}
# ownCloud configuration.
rewrite ^/cloud$ /cloud/ redirect;
rewrite ^/cloud$ $scheme://$http_host/cloud/ redirect;
rewrite ^/cloud/$ /cloud/index.php;
rewrite ^/cloud/(contacts|calendar|files)$ /cloud/index.php/apps/$1/ redirect;
rewrite ^/cloud/(contacts|calendar|files)$ $scheme://$http_host/cloud/index.php/apps/$1/ redirect;
rewrite ^(/cloud/core/doc/[^\/]+/)$ $1/index.html;
location /cloud/ {
alias /usr/local/lib/owncloud/;
@ -50,6 +50,6 @@
}
rewrite ^/.well-known/host-meta /cloud/public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last;
rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav /cloud/remote.php/caldav/ redirect;
rewrite ^/.well-known/carddav $scheme://$http_host/cloud/remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav $scheme://$http_host/cloud/remote.php/caldav/ redirect;

View File

@ -62,7 +62,7 @@ server {
}
# Roundcube Webmail configuration.
rewrite ^/mail$ /mail/ redirect;
rewrite ^/mail$ $scheme://$http_host/mail/ redirect;
rewrite ^/mail/$ /mail/index.php;
location /mail/ {
index index.php;