View Single Post
Old 7th January 2013, 18:14
kendel kendel is offline
HowtoForge Supporter
Join Date: Aug 2010
Posts: 132
Thanks: 4
Thanked 1 Time in 1 Post

Here is a list of things that I did, maybe you can tell me where I went wrong.
First, I installed roundcube on the email server.
(using roundcube.0.8.4 on ubuntu 12.04)

apt-get -y install apache2

Reconfigure Roundcube

aptitude install roundcube roundcube-mysql

dpkg-reconfigure roundcube-core

Create Symlink for RoundCube

sudo ln -s /usr/share/roundcube /var/www/roundcube

restart apache

So far this part works.
I then followed the link and substituted everything for roundcube.
nano /etc/apache2/conf.d/roundcube.conf
(note: there was already a file in that location called roundcube and contained some information I left untouched)

<Directory /usr/share/roundcube>
  Options FollowSymLinks
  <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 .
    php_admin_value upload_tmp_dir /var/lib/roundcube/tmp
    php_admin_value open_basedir /usr/share/roundcube:/etc/roundcube:/var/lib/roundcube:/etc/hostname:/etc/mailname:/var/spool/roundcube
    php_flag register_globals off
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  # access to configtest is limited by default to prevent information leak
  <Files configtest.php>
    order deny,allow
    deny from all
    allow from

Create the directory /var/lib/roundcube/tmp...

mkdir /var/lib/roundcube/tmp

... and make it owned by the user www-data:

chown www-data /var/lib/roundcube/tmp  (this command does not seem to work)

Reload Apache again:

/etc/init.d/apache2 reload
I then used Webmin on the email server to create the virtual host:
DocumentRoot /var/www/roundcube
ServerAdmin webmaster@localhost
ServerAlias webmail.*
<Directory />
Options FollowSymLinks
AllowOverride None
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from ::1/128
<Directory /var/www/roundcube>
allow from all
Options +Indexes
Finally I created the DNS records by attaching an "A" record Host: subdomain IP: (internal ip).

Last edited by kendel; 7th January 2013 at 18:21.
Reply With Quote