1

Topic: How to remove SOGo from URL

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Open Source / free license
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,

In the current iRedMail installation config, Nginx gets configured automatically for all service
NetData
iRedAdmin
SOGo

To access SOGo the Nginx and URL (index.html) is redirected as "https:www.example/SOGo" 
I want to remove SOGo subdirectory from URL.
Could you please share the changes for sogo-subdomain.tmpl (nginx) file in order to remove /SOGo subdirectory from URL.

2

Re: How to remove SOGo from URL

Check /etc/nginx/templates/sogo.tmpl, it's hard to do so, i have no idea. sad

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: How to remove SOGo from URL

/etc/nginx/templates/sogo.tmpl have the same config as solo-subdomain.tmpl

the key in both configurations is the proxy redirect and SOGo rewrite. I tried to play around but once I remove the SOGo the rest of URL loses it's structure.

# Settings for SOGo Groupware

# SOGo
location ~ ^/sogo { rewrite ^ https://www.el-pastas.lt/SOGo; }
location ~ ^/SOGO { rewrite ^ https://www.el-pastas.lt/SOGo; }

# Redirect /mail to /SOGo
location ~ ^/mail { rewrite ^ https://www.el-pastas.lt/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/lib/GNUstep/SOGo/WebServerResources/;
    expires max;
}
location /SOGo/WebServerResources/ {
    alias /usr/lib/GNUstep/SOGo/WebServerResources/;
    expires max;
}
location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
    alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
    expires max;
}

4

Re: How to remove SOGo from URL

I suggest asking in SOGo mailing list, maybe other people has a solution for you:
https://sogo.nu/support.html

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5

Re: How to remove SOGo from URL

ZhangHuangbin wrote:

I suggest asking in SOGo mailing list, maybe other people has a solution for you:
https://sogo.nu/support.html


SOGo support only business customers.
As of open source solution they don't support or advice.

6

Re: How to remove SOGo from URL

- It's still a good idea to post to mailing list to get help from other SOGo users.
- Let's back to your original request, what's the issue of keep /SOGo in url?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

7

Re: How to remove SOGo from URL

ZhangHuangbin wrote:

- It's still a good idea to post to mailing list to get help from other SOGo users.
- Let's back to your original request, what's the issue of keep /SOGo in url?


Hi,

There is no issue, I just have personal preference to have it removed, and just original url.