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