Easy RoundCube (Over SSL) And Webmin With fail2ban For ISPConfig 3 On Debian Squeeze

Discussion in 'HOWTO-Related Questions' started by JohnnyBeGood, Mar 4, 2011.

  1. 8omas

    8omas Member HowtoForge Supporter

    Normally you should not change anything. The installation through package manager is very simple.

    Anyway in my system in /etc/roundcube/ all files belong to root:root except debian-db.php and main.inc.php which belong to root:www-data

    Do you have any main.inc.php in your /etc/roundcube/ directory?
  2. T1mur

    T1mur New Member

    thanks for replay

    yes its look like this :
    root@ns38685:/etc/roundcube# ls -l
    total 60
    -rw-r--r-- 1 root root 1115 Jun 23 12:16 apache.conf
    -rw-r--r-- 1 root root 2260 Oct 18 2010 db.inc.php
    -rw-rw---- 1 www-data www-data 552 Jun 23 12:28 debian-db.php
    -rw-r--r-- 1 root root 567 Sep 27 2009 lighttpd.conf
    -rw-r----- 1 root www-data 18307 Jun 23 12:23 main.inc.php
    -rw-r----- 1 root www-data 18306 Jun 22 19:38 main.inc.php.ucf-old
    -rw-r--r-- 1 root root 2392 Aug 7 2009 mimetypes.php



    i made some progerss ...
    chroot 664 main.inc.php

    now i have :


    Unable to connect to the database!
    Please contact your server-administrator.

    wrrrr... Any idea what else can be wrong ?
    Last edited: Jun 23, 2011
  3. 8omas

    8omas Member HowtoForge Supporter

    It seems that you didn't do the installation correct.
    Please read the last posts of the first page of this thread.
    It's a reinstall procedure of roundcube.
  4. T1mur

    T1mur New Member

    well i did what u tell me and got this same error with main.inc.php but after chmod it works no more problems thx very much

  5. Wisdown

    Wisdown Member

    Was following the guide

    And i havent added those lines:

    <IfModule mod_rewrite.c>
        <IfModule mod_ssl.c>
            <Location /webmail>
              RewriteEngine on
              RewriteCond %{HTTPS} !^on$ [NC]
              RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI}  [L]
    <IfModule mod_rewrite.c>
          <IfModule mod_ssl.c>
             <Location /roundcube>
              RewriteEngine on
              RewriteCond %{HTTPS} !^on$ [NC]
              RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI}  [L]
    But the roundcube only works on (show login screen only):
    Whats is missing on the guide?
    Trying access from any other domain i get:
    ERROR 500 - Internal Server Error!
    And therenothing on /varlog/apache2/access.log or /varlog/apache2/error.log
    Im on debian 6, fresh install once more time...
    Last edited: Sep 5, 2012
  6. 8omas

    8omas Member HowtoForge Supporter

    You wasn't Following the Easy Roundcube over SSL guide, but the Extending Perfect Server guide.

    The first guide, assumes some things in the beggining. Did you follow them?
    The second uses https and a different port (the lines that you haven't add)
  7. Wisdown

    Wisdown Member

    What things you mean?

    I have an multiserver enviroment working, one server for mail, other for web, other for database, other 2 for dns.

    I just dindt added the squirrell mail, was choosing between horde and roundcube so i tried folow this tutorial:


    To increase the security, and followed the setup for get roundcube working, but dindt worked...
  8. 8omas

    8omas Member HowtoForge Supporter

    To increase security you have to redirect to https.
    Do you enabled ssl access (https) for ispconfig?
    If yes, you should redirect roundcube.
    If no, normally, you can access roundcube at

    ALL THE ABOVE are correct for SINGLE server setup.

    I assume that for multiserver setup, you have to install roundcube at the same server as the webserver and configure roundcube accordingly.
    Or you have to install another apache at the same server as mail (VERY BAD CHOISE).

    In every case if you want ssl you need the redirection. If you don't want ssl you sould be able to access the /webmail based on the config file at:
  9. 8omas

    8omas Member HowtoForge Supporter

  10. Wisdown

    Wisdown Member

    I`m not willing enable https, since i only have one IP, and i`m behind NAT...
    Because this i have ignored the 2 lines for https, there an note:

    Like i sayed, i dont wanna SSL, so i have ignored those 2 steps from the guide...

    The title of post i was following says :

    Multisever setup, because this i was following the guide:


    The problem is exact it, i dont wanna the SSL, i dindt have setted anything to SSL, but the results is send me to SSL, only for see the login screen, since the authentication is failing, but this is an issue with my mailserver.
    I think i need set on


    To use TLS, i see an example to add tls://mail.domain.com, i tried and failed too, i`m not sure if i will need set an account info to do the login, and if using this info on other fields of this file, other domains dont gonna get the right accounts on authentication.

    Sorry but i`m learning how mail system works.
    Last edited: Sep 5, 2012
  11. 8omas

    8omas Member HowtoForge Supporter

    can you post the /etc/apache2/conf.d/roundcube.conf
  12. 8omas

    8omas Member HowtoForge Supporter

    One more thing.
    You have to tell roundcube which is your mailserver at /etc/roundcube/main.inc.php
  13. Wisdown

    Wisdown Member

    Sure here is:

  14. Wisdown

    Wisdown Member

    My main.inc.php

    I have changed the domain name, but is like the example, mail.mydomain.com
  15. Wisdown

    Wisdown Member

  16. 8omas

    8omas Member HowtoForge Supporter

    In /etc/roundcube/main.inc.php you have:
    // the mail host chosen to perform the log-in
    // leave blank to show a textbox at login, give a list of hosts
    // to display a pulldown menu or set one host as string.
    // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
    $rcmail_config['default_host'] = 'tls://mail.server.com';
    Is this your mail server?
    You must edit this file to reflect your servers
  17. Wisdown

    Wisdown Member

    Sorry for the delay on asnwer, i`m on exams at university.

    I changed the realname of my server before post here.

    Instead use the previous guide, i did an manual instalation and worked fine, so i think for me the best way is keep roundcube in manual mode instead be able to use the previous guide allowing have automatic updates with:

    apt-get -y install upgrade

Share This Page