|
|
@ -133,10 +133,12 @@ http {
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
|
|
|
|
client_max_body_size {{ MESSAGE_SIZE_LIMIT|int + 8388608 }};
|
|
|
|
auth_request /internal/auth/user;
|
|
|
|
|
|
|
|
proxy_pass http://$webmail;
|
|
|
|
proxy_pass http://$webmail;
|
|
|
|
|
|
|
|
{% if ADMIN == 'true' %}
|
|
|
|
|
|
|
|
auth_request /internal/auth/user;
|
|
|
|
error_page 403 @webmail_login;
|
|
|
|
error_page 403 @webmail_login;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
location {{ WEB_WEBMAIL }}/sso.php {
|
|
|
|
location {{ WEB_WEBMAIL }}/sso.php {
|
|
|
|
{% if WEB_WEBMAIL != '/' %}
|
|
|
|
{% if WEB_WEBMAIL != '/' %}
|
|
|
|
rewrite ^({{ WEB_WEBMAIL }})$ $1/ permanent;
|
|
|
|
rewrite ^({{ WEB_WEBMAIL }})$ $1/ permanent;
|
|
|
@ -152,11 +154,13 @@ http {
|
|
|
|
proxy_pass http://$webmail;
|
|
|
|
proxy_pass http://$webmail;
|
|
|
|
error_page 403 @webmail_login;
|
|
|
|
error_page 403 @webmail_login;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
location @webmail_login {
|
|
|
|
location @webmail_login {
|
|
|
|
return 302 {{ WEB_ADMIN }}/ui/login?next=ui.webmail;
|
|
|
|
return 302 {{ WEB_ADMIN }}/ui/login?next=ui.webmail;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
{% endif %}{% endif %}
|
|
|
|
{% if ADMIN == 'true' %}
|
|
|
|
{% if ADMIN == 'true' %}
|
|
|
|
location {{ WEB_ADMIN }} {
|
|
|
|
location {{ WEB_ADMIN }} {
|
|
|
|
return 301 {{ WEB_ADMIN }}/ui;
|
|
|
|
return 301 {{ WEB_ADMIN }}/ui;
|
|
|
|