Topic: second virtual host for sogo
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi
I recently setup a new virtualHost to have second SOGo webmail.
but it redirect ti first virtual host.
# Settings for SOGo Groupware
server_name mail.test1.com;
# SOGo
location ~ ^/sogo { rewrite ^ https://$host/SOGo; }
location ~ ^/SOGO { rewrite ^ https://$host/SOGo; }
# Redirect /mail to /SOGo
#location ~ ^/mail { rewrite ^ https://$host/SOGo; }
# For Mac OS X and iOS devices.
rewrite ^/.well-known/caldav /SOGo/dav permanent;
rewrite ^/.well-known/carddav /SOGo/dav permanent;
rewrite ^/principals /SOGo/dav permanent;
location ^~ /SOGo {
include /etc/nginx/templates/hsts.tmpl;
proxy_pass http://127.0.0.1:20000;
# forward user's IP address
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
# always use https
proxy_set_header x-webobjects-server-port $server_port;
proxy_set_header x-webobjects-server-name $host;
proxy_set_header x-webobjects-server-url https://$host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
}
location ^~ /Microsoft-Server-ActiveSync {
proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-S … ctiveSync;
proxy_connect_timeout 3540;
proxy_send_timeout 3540;
proxy_read_timeout 3540;
}
location ^~ /SOGo/Microsoft-Server-ActiveSync {
proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-S … ctiveSync;
proxy_connect_timeout 3540;
proxy_send_timeout 3540;
proxy_read_timeout 3540;
}
location /SOGo.woa/WebServerResources/ {
alias /usr/lib64/GNUstep/SOGo/WebServerResources/;
"/etc/nginx/templates/sogo.tmpl" 61L, 1803C
Second Virtual Host Config:
# Settings for SOGo Groupware
#DomainName oF 2's test webMail
server_name mail.NewTest.ir;
# SOGo
location ~ ^/NewTest { rewrite ^ https://$host/NewTest; }
location ~ ^/NewTest { rewrite ^ https://$host/NewTest; }
# Redirect /mail to /SOGo
#location ~ ^/mail { rewrite ^ https://$host/NewTest; }
# For Mac OS X and iOS devices.
rewrite ^/.well-known/caldav /NewTest/dav permanent;
rewrite ^/.well-known/carddav /NewTest/dav permanent;
rewrite ^/principals /NewTest/dav permanent;
location ^~ /NewTest {
include /etc/nginx/templates/hsts.tmpl;
proxy_pass http://127.0.0.1:20000;
# forward user's IP address
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
# always use https
proxy_set_header x-webobjects-server-port $server_port;
proxy_set_header x-webobjects-server-name $host;
proxy_set_header x-webobjects-server-url https://$host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
}
#location ^~ /Microsoft-Server-ActiveSync {
# proxy_pass http://127.0.0.1:20000/NewTest/Microsof … ctiveSync;
# proxy_connect_timeout 3540;
# proxy_send_timeout 3540;
# proxy_read_timeout 3540;
#}
location ^~ /NewTest/Microsoft-Server-ActiveSync {
proxy_pass http://127.0.0.1:20000/NewTest/Microsof … ctiveSync;
proxy_connect_timeout 3540;
proxy_send_timeout 3540;
proxy_read_timeout 3540;
}
#location /SOGo.woa/WebServerResources/ {
# alias /usr/lib64/GNUstep/NewTest/WebServerResources/;
"/etc/nginx/templates/NewTest.tmpl" 61L, 1978C
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.