View Single Post
  #13  
Old 5th March 2013, 18:10
JeffryL JeffryL is offline
Member
 
Join Date: Apr 2011
Posts: 35
Thanks: 9
Thanked 0 Times in 0 Posts
Default

Installed roundcube on Ubuntu 12.04 by:

Code:
apt-get install roundcube
Code:
dpkg-reconfigure roundcube-core
I added this lines to apps.vhost:

Code:
  # SSL Configuration
  SSLEngine On
  SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
  SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
  #SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
This is my roundcube.conf:

Code:
# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
#    Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
    Alias /webmail /var/lib/roundcube
    Alias /roundcube /var/lib/roundcube

# Access to tinymce files
<Directory "/usr/share/tinymce/www/">
      Options Indexes MultiViews FollowSymLinks
      AllowOverride None
      Order allow,deny
      allow from all
</Directory>

<Directory /var/lib/roundcube/>
  Options +FollowSymLinks
  # This is needed to parse /var/lib/roundcube/.htaccess. See its
  # content before setting AllowOverride to None.
  AllowOverride All
  order allow,deny
  allow from all
</Directory>

# Protecting basic directories:
<Directory /var/lib/roundcube/config>
        Options -FollowSymLinks
        AllowOverride None
</Directory>

<Directory /var/lib/roundcube/temp>
        Options -FollowSymLinks
        AllowOverride None
	Order allow,deny
	Deny from all
</Directory>

<Directory /var/lib/roundcube/logs>
        Options -FollowSymLinks
        AllowOverride None
	Order allow,deny
	Deny from all
</Directory>

<IfModule mod_rewrite.c>
  <IfModule mod_ssl.c>
    <Location /webmail>
      RewriteEngine on
      RewriteCond %{HTTPS} !^on$ [NC]
      RewriteRule . https://%{HTTP_HOST}:8081%{REQUEST_URI}  [L]
    </Location>
  </IfModule>

<IfModule mod_rewrite.c>
  <IfModule mod_ssl.c>
    <Location /roundcube>
      RewriteEngine on
      RewriteCond %{HTTPS} !^on$ [NC]
      RewriteRule . https://%{HTTP_HOST}:8081%{REQUEST_URI}  [L]
    </Location>
  </IfModule>

<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_admin_flag allow_url_fopen Off
php_value include_path .:/usr/share/php:/usr/share/pear
php_admin_value upload_tmp_dir /var/lib/roundcube/temp
php_admin_value open_basedir /usr/share/php:/usr/lib/roundcube:/etc/roundcube:/usr/share/roundcube:/var/lib/roundcube:/var/log/roundcube
php_flag register_globals off
</IfModule>
This works, also on a multiserver setting. Just make sure you enter the correct settings when reconfiguring...

One final question to the experts here... is it safe? My doubt goes out to the way I enabled logging (by including it as open_basedir)

Last edited by JeffryL; 5th March 2013 at 18:54.
Reply With Quote