1

Topic: SOGo change default url /SOGo/

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 9.0.4
- Linux/BSD distribution name and version: CentOS 7.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB 10.1.11
- Web server (Apache or Nginx): Apache 2.4.6
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

Hello everyone!

How to change default url mydomain.tld/SOGo/ to mydomain.tld/mycustomurl/ ?

Thanks!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: SOGo change default url /SOGo/

Change the URL (/SOGo) in /etc/httpd/conf.d/SOGo.conf.

3

Re: SOGo change default url /SOGo/

Alias /SOGo.woa/WebServerResources/ \
      /usr/lib64/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ \
      /usr/lib64/GNUstep/SOGo/WebServerResources/

<Directory /usr/lib64/GNUstep/SOGo/>
    AllowOverride None

    <IfVersion < 2.4>     
        Order deny,allow
        Allow from all
    </IfVersion>
    <IfVersion >= 2.4>
        Require all granted
    </IfVersion>

    # Explicitly allow caching of static content to avoid browser specific behavior.
    # A resource's URL MUST change in order to have the client load the new version.
    <IfModule expires_module>
      ExpiresActive On
      ExpiresDefault "access plus 1 year"
    </IfModule>
</Directory>

## Uncomment the following to enable proxy-side authentication, you will then
## need to set the "SOGoTrustProxyAuthentication" SOGo user default to YES and
## adjust the "x-webobjects-remote-user" proxy header in the "Proxy" section
## below.
#
## For full proxy-side authentication:
#<Location /SOGo>
#  AuthType XXX
#  Require valid-user
#  SetEnv proxy-nokeepalive 1
#  Allow from all
#</Location>
#
## For proxy-side authentication only for CardDAV and GroupDAV from external
## clients:
#<Location /SOGo/dav>
#  AuthType XXX
#  Require valid-user
#  SetEnv proxy-nokeepalive 1
#  Allow from all
#</Location>

ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On

# Enable to use Microsoft ActiveSync support
# Note that you MUST have many sogod workers to use ActiveSync.
# See the SOGo Installation and Configuration guide for more details.
#
ProxyPass /Microsoft-Server-ActiveSync \
http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
retry=60 connectiontimeout=5 timeout=360

# When using CAS, you should uncomment this and install cas-proxy-validate.py
# in /usr/lib64/cgi-bin to reduce server overloading
#
# ProxyPass /SOGo/casProxy http://localhost/cgi-bin/cas-proxy-validate.py
# <Proxy http://localhost/app/cas-proxy-validate.py>
#   Order deny,allow
#   Allow from your-cas-host-addr
# </Proxy>

ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0

<Proxy http://127.0.0.1:20000/SOGo>
## adjust the following to your configuration
  RequestHeader set "x-webobjects-server-port" "443"
##  RequestHeader set "x-webobjects-server-name" "mydomain.tld"
##  RequestHeader set "x-webobjects-server-url" "https://mydomain.tld"

## When using proxy-side autentication, you need to uncomment and
## adjust the following line:
  RequestHeader unset "x-webobjects-remote-user"
#  RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER

  RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"

  AddDefaultCharset UTF-8

  Order allow,deny
  Allow from all
</Proxy>

# For Apple autoconfiguration
<IfModule rewrite_module>
  RewriteEngine On
  RewriteRule ^/.well-known/caldav/?$ /SOGo/dav [R=301]
  RewriteRule ^/.well-known/carddav/?$ /SOGo/dav [R=301]
</IfModule>


Please, in which lines should be replaced?

If I change the line:
=================

Alias /SOGo.woa/WebServerResources/ \
      /usr/lib64/GNUstep/SOGo/WebServerResources/
Alias /mycustomurl/WebServerResources/ \
      /usr/lib64/GNUstep/SOGo/WebServerResources/

<Directory /usr/lib64/GNUstep/SOGo/>
    AllowOverride None

    <IfVersion < 2.4>     
        Order deny,allow
        Allow from all
    </IfVersion>
    <IfVersion >= 2.4>
        Require all granted
    </IfVersion>

    # Explicitly allow caching of static content to avoid browser specific behavior.
    # A resource's URL MUST change in order to have the client load the new version.
    <IfModule expires_module>
      ExpiresActive On
      ExpiresDefault "access plus 1 year"
    </IfModule>
</Directory>

## Uncomment the following to enable proxy-side authentication, you will then
## need to set the "SOGoTrustProxyAuthentication" SOGo user default to YES and
## adjust the "x-webobjects-remote-user" proxy header in the "Proxy" section
## below.
#
## For full proxy-side authentication:
#<Location /SOGo>
#  AuthType XXX
#  Require valid-user
#  SetEnv proxy-nokeepalive 1
#  Allow from all
#</Location>
#
## For proxy-side authentication only for CardDAV and GroupDAV from external
## clients:
#<Location /SOGo/dav>
#  AuthType XXX
#  Require valid-user
#  SetEnv proxy-nokeepalive 1
#  Allow from all
#</Location>

ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On

# Enable to use Microsoft ActiveSync support
# Note that you MUST have many sogod workers to use ActiveSync.
# See the SOGo Installation and Configuration guide for more details.
#
ProxyPass /Microsoft-Server-ActiveSync \
http://127.0.0.1:20000/mycustomurl/Micr … ActiveSync \
retry=60 connectiontimeout=5 timeout=360

# When using CAS, you should uncomment this and install cas-proxy-validate.py
# in /usr/lib64/cgi-bin to reduce server overloading
#
# ProxyPass /SOGo/casProxy http://localhost/cgi-bin/cas-proxy-validate.py
# <Proxy http://localhost/app/cas-proxy-validate.py>
#   Order deny,allow
#   Allow from your-cas-host-addr
# </Proxy>

ProxyPass /mycustomurl http://127.0.0.1:20000/mycustomurl retry=0

<Proxy http://127.0.0.1:20000/mycustomurl>
## adjust the following to your configuration
  RequestHeader set "x-webobjects-server-port" "443"
##  RequestHeader set "x-webobjects-server-name" "mydomain.tld"
##  RequestHeader set "x-webobjects-server-url" "https://mydomain.tld"

## When using proxy-side autentication, you need to uncomment and
## adjust the following line:
  RequestHeader unset "x-webobjects-remote-user"
#  RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER

  RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"

  AddDefaultCharset UTF-8

  Order allow,deny
  Allow from all
</Proxy>

# For Apple autoconfiguration
<IfModule rewrite_module>
  RewriteEngine On
  RewriteRule ^/.well-known/caldav/?$ /SOGo/dav [R=301]
  RewriteRule ^/.well-known/carddav/?$ /SOGo/dav [R=301]
</IfModule>



=================


I getting: Authentication Failed

4

Re: SOGo change default url /SOGo/

Change this one (and just first '/SOGo'):

ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0

5

Re: SOGo change default url /SOGo/

Error 404 sad

6

Re: SOGo change default url /SOGo/

Show us what you changed.

7 (edited by kysil 2016-02-24 17:50:21)

Re: SOGo change default url /SOGo/

Only this line:
ProxyPass /mail http://127.0.0.1:20000/SOGo retry=0

p.s.: I not have Roundcube Webmail

8

Re: SOGo change default url /SOGo/

I am also stuck at same place.

I tried this
ProxyPass /  http://127.0.0.1:20000/SOGo retry=0 

and
ProxyPass /webmail  http://127.0.0.1:20000/SOGo retry=0 

but I get broken login page
http://prnt.sc/ddbkco
ProxyPass /Microsoft-Server-ActiveSync \
http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
retry=60 connectiontimeout=5 timeout=3600

#ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0   # This works well
ProxyPass /  http://127.0.0.1:20000/SOGo retry=0    # With this, I get login page as http://prnt.sc/ddbkco
<Proxy http://127.0.0.1:20000/SOGo>
## adjust the following to your configuration
## and do not forget to enable the headers module
<IfModule headers_module>
  RequestHeader set "x-webobjects-server-port" "443"
  RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}e" env=HTTP_HOST
  RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST

## When using proxy-side autentication, you need to uncomment and
## adjust the following line:
  RequestHeader unset "x-webobjects-remote-user"
#  RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER

  RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
</IfModule>
  AddDefaultCharset UTF-8
  Order allow,deny
  Allow from all
</Proxy>