|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
# Basic configuration
|
|
|
|
|
user nginx;
|
|
|
|
|
worker_processes auto;
|
|
|
|
|
error_log /dev/stderr info;
|
|
|
|
|
error_log /dev/stderr debug;
|
|
|
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
load_module "modules/ngx_mail_module.so";
|
|
|
|
|
|
|
|
|
@ -117,17 +117,29 @@ http {
|
|
|
|
|
include /overrides/*.conf;
|
|
|
|
|
|
|
|
|
|
# Actual logic
|
|
|
|
|
location ^~ /sso {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_pass http://$admin;
|
|
|
|
|
}
|
|
|
|
|
location ^~ {{ WEB_ADMIN }}/sso {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
rewrite ^{{ WEB_ADMIN }}/(.*)$ /$1 break;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
rewrite ^{{ WEB_ADMIN }}/(.*) /$1 redirect;
|
|
|
|
|
}
|
|
|
|
|
location ^~ /ui/webmail {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
return 302 {{ WEB_WEBMAIL }};
|
|
|
|
|
}
|
|
|
|
|
location ^~ /ui {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
#rewrite ^/sso/(.*) {{ WEB_ADMIN }}/$1 redirect;
|
|
|
|
|
return 302 {{ WEB_ADMIN }}/ui/;
|
|
|
|
|
}
|
|
|
|
|
location ^~ /sso {
|
|
|
|
|
include /etc/nginx/proxy.conf;
|
|
|
|
|
proxy_pass http://$admin;
|
|
|
|
|
}
|
|
|
|
|
# location ^~ /(ui|static) {
|
|
|
|
|
# rewrite ^{{ WEB_ADMIN }}/(.*) /$1 break;
|
|
|
|
|
# include /etc/nginx/proxy.conf;
|
|
|
|
|
# proxy_set_header X-Forwarded-Prefix {{ WEB_ADMIN }};
|
|
|
|
|
# proxy_pass http://$admin;
|
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
|
{% if WEB_WEBMAIL != '/' and WEBROOT_REDIRECT != 'none' %}
|
|
|
|
|
location / {
|
|
|
|
|