1

Topic: Nginx iRedMail roundcube error

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: iRedMail-0.8.5
- Store mail accounts in which backend (MySQL):
- Linux/BSD distribution name and version: CentOS 6.4
- Related log if you're reporting an issue:

tail -f /var/www/roundcubemail/logs/errors
[17-Sep-2013 19:05:17 +0000]: DB Error: Configuration error. Unsupported database driver:  in /var/www/roundcubemail-0.9.2/program/lib/Roundcube/rcube_db.php on line 75 (GET /)
[17-Sep-2013 19:05:21 +0000]: DB Error: Configuration error. Unsupported database driver:  in /var/www/roundcubemail-0.9.2/program/lib/Roundcube/rcube_db.php on line 75 (GET /)
[17-Sep-2013 19:05:21 +0000]: DB Error: Configuration error. Unsupported database driver:  in /var/www/roundcubemail-0.9.2/program/lib/Roundcube/rcube_db.php on line 75 (GET /)
[17-Sep-2013 19:05:22 +0000]: DB Error: Configuration error. Unsupported database driver:  in /var/www/roundcubemail-0.9.2/program/lib/Roundcube/rcube_db.php on line 75 (GET /)

====

Hi all,

This is my first time using iRedMail and for the first time it's work like a charm smile I'm using Apache as the web server to serve the webmail and the iredadmin. Both work with no errors.

Since my customer want to used Nginx, I've already configured uwsgi to server the iredadmin and it's also work. But except the roundcube, When I start the php_cgi and try to access the webmail it gives a blank page and the errors as above.

Does anyone encounter same like me ?

nginx webmail.conf :

server {
        listen 443 ssl;
        server_name svr2.mydomain.my;

        access_log /var/log/nginx/webmail.access.log;
        error_log /var/log/nginx/webmail.error.log;

    root   /var/www/roundcubemail/;
    index  index.php;

        location ~ \.php$ {
        root    /var/www/roundcubemail/;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SERVER_NAME $http_host;
                fastcgi_ignore_client_abort on;
        }

    ssl                  on;
        ssl_certificate      /etc/pki/tls/certs/iRedMail_CA.pem;
        ssl_certificate_key  /etc/pki/tls/private/iRedMail.key;
        ssl_session_timeout  5m;
        ssl_protocols  SSLv2 SSLv3 TLSv1;
        ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;

}

Thanks in advance.

----

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

2

Re: Nginx iRedMail roundcube error

FryShadow wrote:

[17-Sep-2013 19:05:21 +0000]: DB Error: Configuration error. Unsupported database driver:  in /var/www/roundcubemail-0.9.2/program/lib/Roundcube/rcube_db.php on line 75 (GET /)

It says "unsupported database driver", do you have correct database settings (driver, username, password) in Roundcube config file (/var/www/roundcubemail-0.9.2/config/db.inc.php)?

3

Re: Nginx iRedMail roundcube error

When I'm using Apache, the webmail can be access without any error. The error appear once I'm switch to Nginx... The config should be the same right ?

4

Re: Nginx iRedMail roundcube error

Not sure what the problem is.

Here's a minimal Nginx config file ('server {}' part)i used for Roundcube, it works for me, but not sure whether it works for you or not.

        listen 80;
        server_name _;
        
        # Use the same document root as Apache.
        root /var/www;
        index  index.php index.html index.htm;
        
        location / {
            root /var/www/html;
        }

        # Roundcube webmail
        location ~ /mail(.*)\.php$ {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index  index.php;
            #fastcgi_param  SCRIPT_FILENAME /var/www/roundcubemail$fastcgi_script_name;
            fastcgi_param  SCRIPT_FILENAME /var/www/roundcubemail$1.php;
            include fastcgi_params;
        }
            
        location ~ /mail(.*) {
            alias /var/www/roundcubemail$1;
        }
        
        location ~ ^/mail/(bin|SQL|README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ { deny all; }
        
        location ~ \.php$ {
            fastcgi_pass 127.0.0.1:9000;
            include fastcgi_params;
        }

        # Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
        location ~ /\. { deny all; access_log off; log_not_found off; }

NOTE: It uses Apache style alias instead of using a new subdomain name to host webmail, hope it's ok for you.

5

Re: Nginx iRedMail roundcube error

Hi,

Been busy lately. When I switch my user and group for my nginx daemon to nginx, then the error of DB error come out. As previously the owner and group of db.inc.php is apache, somehow roundcube can't find or can't read the config file and raise the DB Error.

Please make sure the owner and group of your config file set to a correct one smile