1

Topic: SOGo FQDN redirects to private IP address

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello, everybody.

I have SOGo published along with RoundCube and other apps and they all work properly (except SOGo).

I tried playing with SOGo and found out that for some reason once I log in SOGo redirects me to a url with the private IP address.  So, the initial URL is https://myhostname.com/SOGo/ and it resolves correctly and the browser is happy.  Once I enter my login details SOGo takes me to https://192.168.2.104/SOGo/so/myemailad … n.com/Mail and since the certificate is issued to https://myhostname.com/ I get a warning in the browser about the certificate mismatch.

How do I make SOGo stay in the FQDN instead of generating URLs with the private IP address?

Thanks

Since I have a certificate linked to the server

----

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

2

Re: SOGo FQDN redirects to private IP address

Did you change any config in file /etc/apache2/conf-available/SOGo.conf?

3

Re: SOGo FQDN redirects to private IP address

ZhangHuangbin wrote:

Did you change any config in file /etc/apache2/conf-available/SOGo.conf?

No, I did not change any config files for SOGo. I went through them trying to find references to SSL certificates but I did not find any.  No changes were made.

4

Re: SOGo FQDN redirects to private IP address

could you please show us full content of /etc/apache2/conf-available/SOGo.conf?

5

Re: SOGo FQDN redirects to private IP address

Hello, here below is the fill SOGo.conf file from my server
--------------------------------------------------------------------------------
Alias /SOGo.woa/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/

<Directory /usr/lib/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>

ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On

ProxyPass /Microsoft-Server-ActiveSync http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync retry=60 connectiontimeout=5 timeout=360
ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0

<Proxy http://127.0.0.1:20000/SOGo>
    # Redirect http access of /SOGo to https
    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"

    AddDefaultCharset UTF-8
</Proxy>

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

6

Re: SOGo FQDN redirects to private IP address

SOGo.conf is ok.

No idea right now, sorry. Need to debug by checking other log files and config files with ssh access.

Would you like to buy a support ticket to get assistance from us? If it's a bug of iRedMail default settings, the support will be free.
http://www.iredmail.org/support.html