Computer Tips - How do you install RoundCube Mail on RedHat/Fedora/CentOS?

Date: 2015dec24 OS: Linux Product: RoundCube Mail Q. How do you install RoundCube Mail on RedHat/Fedora/CentOS? A. This worked for me. - dnf install roundcubemail - I had to change the web permissions since I was not logging in from localhost. In /etc/httpd/conf.d/roundcubemail.conf added "Require all granted" and commented out other directives:
<Directory /usr/share/roundcubemail/> <IfModule mod_authz_core.c> # Apache 2.4 # Require local Require all granted </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 # Order Deny,Allow # Deny from all # Allow from 127.0.0.1 # Allow from ::1 Order allow,deny Allow from all </IfModule> </Directory> <Directory /usr/share/roundcubemail/installer/> <IfModule mod_authz_core.c> # Apache 2.4 # Require local Require all granted </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 # Order Deny,Allow # Deny from all # Allow from 127.0.0.1 # Allow from ::1 Order allow,deny Allow from all </IfModule> </Directory>
- I then restarted Apache and browsed to http://example.com/roundcubemail/installer - This makes a config file which you download and place in /etc/roundcube I had to make some corrections in the file (/etc/roundcube/config.ini.php):
# I am using sqlite. I made folder /var/roundcube $config['db_dsnw'] = 'sqlite:////var/roundcube/sqlite.db?mode=0646';
# I needed to add this so users don't get localhost $config['mail_domain'] = 'example.com';
- Then I logged in as a regular Linux user at http://example.com/roundcubemail - Since it works I then tighten up the installer permissions:
<Directory /usr/share/roundcubemail/installer/> <IfModule mod_authz_core.c> # Apache 2.4 # Require local Require all denied </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from all # Allow from 127.0.0.1 # Allow from ::1 </IfModule> </Directory>
- I made it SSL-only by adding the following to /etc/httpd/conf.d/roundcubemail.conf
# This section makes roundcube use https connections only, for this you # need to have mod_ssl installed. If you want to use unsecure http # connections, just remove this section: <Directory /usr/share/roundcubemail> RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} <IfModule mod_authz_core.c> # Apache 2.4 Require all granted </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order allow,deny Allow from all </IfModule> </Directory>
I changed the location so attackers cann't find it:
Alias /random9993434 /usr/share/roundcubemail
And restarted Apache