mirror of
https://github.com/Mailu/Mailu.git
synced 2025-06-12 23:57:29 +02:00
Moved locations to correct area in nginx.conf.
This commit is contained in:
parent
aa7380ffba
commit
eb74a72a52
@ -128,30 +128,12 @@ http {
|
||||
include /overrides/*.conf;
|
||||
|
||||
# Actual logic
|
||||
{% if ADMIN == 'true' %}
|
||||
location ^~ /ui {
|
||||
include /etc/nginx/proxy.conf;
|
||||
rewrite ^/ui/(.*) {{ WEB_ADMIN }}/ui/$1 redirect;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if ADMIN == 'true' or WEBMAIL != 'none' %}
|
||||
location ^~ /sso {
|
||||
include /etc/nginx/proxy.conf;
|
||||
proxy_pass http://$admin;
|
||||
}
|
||||
|
||||
location ^~ /sso/static {
|
||||
include /etc/nginx/proxy.conf;
|
||||
rewrite /sso/static/(.*) /static/$1 permanent;
|
||||
}
|
||||
|
||||
location ^~ {{ WEB_WEBMAIL }}/sso/ui/logout {
|
||||
include /etc/nginx/proxy.conf;
|
||||
rewrite ^{{ WEB_WEBMAIL }}/sso/ui/logout$ /sso/logout break;
|
||||
proxy_pass http://$admin;
|
||||
}
|
||||
|
||||
location ^~ /ui/language {
|
||||
include /etc/nginx/proxy.conf;
|
||||
proxy_set_header X-Forwarded-Prefix {{ WEB_ADMIN }};
|
||||
@ -159,17 +141,17 @@ http {
|
||||
expires $expires;
|
||||
}
|
||||
|
||||
location ^~ /ui/webmail {
|
||||
location ^~ /sso/static {
|
||||
include /etc/nginx/proxy.conf;
|
||||
return 302 {{ WEB_WEBMAIL }};
|
||||
rewrite /sso/static/(.*) /static/$1 permanent;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
location ^~ /static {
|
||||
include /etc/nginx/proxy.conf;
|
||||
rewrite ^/static/(.*) /ui/static/$1 break;
|
||||
proxy_pass http://$admin;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if WEB_WEBMAIL != '/' and WEBROOT_REDIRECT != 'none' %}
|
||||
location / {
|
||||
@ -216,10 +198,26 @@ http {
|
||||
location @webmail_login {
|
||||
return 302 /sso/login?next=ui.webmail;
|
||||
}
|
||||
|
||||
location ^~ {{ WEB_WEBMAIL }}/sso/ui/logout {
|
||||
include /etc/nginx/proxy.conf;
|
||||
rewrite ^{{ WEB_WEBMAIL }}/sso/ui/logout$ /sso/logout break;
|
||||
proxy_pass http://$admin;
|
||||
}
|
||||
|
||||
location ^~ /ui/webmail {
|
||||
include /etc/nginx/proxy.conf;
|
||||
return 302 {{ WEB_WEBMAIL }};
|
||||
}
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
{% if ADMIN == 'true' %}
|
||||
location ^~ /ui {
|
||||
include /etc/nginx/proxy.conf;
|
||||
rewrite ^/ui/(.*) {{ WEB_ADMIN }}/ui/$1 redirect;
|
||||
}
|
||||
|
||||
location {{ WEB_ADMIN }} {
|
||||
return 301 {{ WEB_ADMIN }}/ui;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user