1 (edited by hifall 2020-07-27 13:13:54)

Topic: Unable to access webmail after installation.

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

I followed the instructions on https://docs.iredmail.org/install.iredm … buntu.html using a clean VSP to set up iRedmail for mydomain.com. However, after installation, I was not able to access the links below:

Roundcube webmail: https://mydomain.com/mail/
SOGo Groupware: https://mydomain.com/SOGo
Web admin panel (iRedAdmin): httpS://mydomain.com/iredadmin/

My setup settings:

*************************************************************************
********************** Review your settings *****************************
*************************************************************************

* Storage base directory:               /var/vmail
* Mailboxes:
* Daily backup of SQL/LDAP databases:
* Store mail accounts in:               MariaDB
* Web server:                           Nginx
* First mail domain name:               mydomain.com
* Mail domain admin:                    postmaster@mydomain.com
* Additional components:                Roundcubemail SOGo netdata iRedAdmin Fail2ban

< Question > Continue? [y|N]y

I haven't run the instructions in the "Important things you MUST know after installation" section, specifically there is no SSL cert yet, as it did not seem mandatory in the doc.

When I tried to access https://mydomain.com/mail/, I got an "ERR_CONNECTION_RESET" error in the browser. Please see the file attached.

Can I have the instructions on how to fix this issue?

Thanks!

2

Re: Unable to access webmail after installation.

Is DNS setup properly pointing your MyDomain.com to the IP address the server is hosted on? Is it a public facing IP?

3

Re: Unable to access webmail after installation.

PaulCahill wrote:

Is DNS setup properly pointing your MyDomain.com to the IP address the server is hosted on? Is it a public facing IP?

Yes and yes.

4

Re: Unable to access webmail after installation.

What's your server hostname? It should be https://<hostname>/mail/

----

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 (edited by hifall 2020-07-29 19:00:24)

Re: Unable to access webmail after installation.

ZhangHuangbin wrote:

What's your server hostname? It should be https://<hostname>/mail/

I've tried that too. Ran into the same issue.

How can I debug this?

Thanks!

6

Re: Unable to access webmail after installation.

Did you reboot after the install? That is a requirement.
Did you check your nginx log files? (typically located in /var/log/nginx)
Check /etc/nginx/sites-enabled/00-default.conf to make sure it is pointing to the correct doc root?
Is nginx running? because that error above sounds like it may not be.
  - ps -ef |grep [n]ginx should return something like:
    root            1273     1     0 Jul22 ?        00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
    www-data  1274  1273  0 Jul22 ?        00:02:21 nginx: worker process

7

Re: Unable to access webmail after installation.

PaulCahill wrote:

Did you reboot after the install? That is a requirement.
Did you check your nginx log files? (typically located in /var/log/nginx)
Check /etc/nginx/sites-enabled/00-default.conf to make sure it is pointing to the correct doc root?
Is nginx running? because that error above sounds like it may not be.
  - ps -ef |grep [n]ginx should return something like:
    root            1273     1     0 Jul22 ?        00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
    www-data  1274  1273  0 Jul22 ?        00:02:21 nginx: worker process

Thanks Paul.

I'd restarted before I tested.

I just checked my nginx log files (access and error), but I did not find anything related to my access.

The content of my /etc/nginx/sites-enabled/default.conf (00-default.cong not found) looks like this:

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;

        root /var/www/html;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

        # pass PHP scripts to FastCGI server
        #
        #location ~ \.php$ {
        #       include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        #       fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        #       # With php-cgi (or other tcp sockets):
        #       fastcgi_pass 127.0.0.1:9000;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}
}

My nginx is running:
service nginx status
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-07-27 10:42:28 UTC; 2 days ago

Here is the content under /var/www/html:
root@mail:/var/www/html# ls
index.nginx-debian.html

8

Re: Unable to access webmail after installation.

hifall wrote:

The content of my /etc/nginx/sites-enabled/default.conf (00-default.cong not found) looks like this:

iRedMail always generates /etc/nginx/sites-enabled/00-default.conf and 00-default-ssl.conf. Seems your Nginx configuration was not complete or incorrect.
A simpler solution might be reinstalling server OS and install iRedMail again.

----

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

buy me a cup of coffee

9

Re: Unable to access webmail after installation.

I had a similar issue on one of my installs because ipv6 was disabled. The nginx install didn't like that and the iredmail nginx portion scripts in iredmail didn't run because of that. I manually installed nginx before installing iredmail and then disabled the ipv6 stuff in the nginx conf files. After doing that, iredmail installed just fine.