|
|
|
@ -128,15 +128,6 @@ http {
|
|
|
|
|
include /overrides/*.conf;
|
|
|
|
|
|
|
|
|
|
# Actual logic
|
|
|
|
|
location ^~ {{ WEB_ADMIN }}/sso {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
rewrite ^{{ WEB_ADMIN }}/(.*) /$1 redirect;
|
|
|
|
|
}
|
|
|
|
|
location ^~ /ui/webmail {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
return 302 {{ WEB_WEBMAIL }};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{% if ADMIN == 'true' %}
|
|
|
|
|
location ^~ /ui {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
@ -149,14 +140,31 @@ http {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
proxy_pass http://$admin;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ^~ /sso/static {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
rewrite /sso/static/(.*) /static/$1 permanent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ^~ /ui/language {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
proxy_set_header X-Forwarded-Prefix {{ WEB_ADMIN }};
|
|
|
|
|
proxy_pass http://$admin;
|
|
|
|
|
expires $expires;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ^~ /ui/webmail {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
return 302 {{ WEB_WEBMAIL }};
|
|
|
|
|
}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
location ^~ /static {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
rewrite ^/static/(.*) /ui/static/$1 break;
|
|
|
|
|
proxy_pass http://$admin;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{% if WEB_WEBMAIL != '/' and WEBROOT_REDIRECT != 'none' %}
|
|
|
|
|
location / {
|
|
|
|
|
expires $expires;
|
|
|
|
@ -209,7 +217,7 @@ http {
|
|
|
|
|
return 301 {{ WEB_ADMIN }}/ui;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ~ {{ WEB_ADMIN }}/(ui|static) {
|
|
|
|
|
location ~ {{ WEB_ADMIN }}/ui {
|
|
|
|
|
rewrite ^{{ WEB_ADMIN }}/(.*) /$1 break;
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
proxy_set_header X-Forwarded-Prefix {{ WEB_ADMIN }};
|
|
|
|
@ -217,6 +225,11 @@ http {
|
|
|
|
|
expires $expires;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ^~ {{ WEB_ADMIN }}/ui/static {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
rewrite {{ WEB_ADMIN }}/ui/static/(.*) /static/$1 permanent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location {{ WEB_ADMIN }}/antispam {
|
|
|
|
|
rewrite ^{{ WEB_ADMIN }}/antispam/(.*) /$1 break;
|
|
|
|
|
auth_request /internal/auth/admin;
|
|
|
|
@ -224,6 +237,11 @@ http {
|
|
|
|
|
proxy_set_header X-Forwarded-For "";
|
|
|
|
|
proxy_pass http://$antispam;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ^~ {{ WEB_ADMIN }}/sso {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
rewrite ^{{ WEB_ADMIN }}/(.*) /$1 redirect;
|
|
|
|
|
}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if WEBDAV != 'none' %}
|
|
|
|
|