diff --git a/core/nginx/conf/nginx.conf b/core/nginx/conf/nginx.conf index 62e5c54b..bc6780f5 100644 --- a/core/nginx/conf/nginx.conf +++ b/core/nginx/conf/nginx.conf @@ -135,7 +135,7 @@ http { # Actual logic {% if ADMIN == 'true' or WEBMAIL != 'none' %} - location ~ ^/(sso|static) { + location ~ ^/(sso|static)/ { include /etc/nginx/proxy.conf; proxy_pass http://$admin; } @@ -165,7 +165,11 @@ http { proxy_pass http://$webmail; } + {% if WEB_WEBMAIL == '/' %} + location /sso.php { + {% else %} location {{ WEB_WEBMAIL }}/sso.php { + {% endif %} {% if WEB_WEBMAIL != '/' %} rewrite ^({{ WEB_WEBMAIL }})$ $1/ permanent; rewrite ^{{ WEB_WEBMAIL }}/(.*) /$1 break; diff --git a/towncrier/newsfragments/2078.fix b/towncrier/newsfragments/2078.fix new file mode 100644 index 00000000..2a05e5f4 --- /dev/null +++ b/towncrier/newsfragments/2078.fix @@ -0,0 +1 @@ +SSO login page to webmail did not work if WEB_WEBMAIL=/ was set. \ No newline at end of file