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)
Code:
oundCube
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.
Code:
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>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
# access to configtest is limited by default to prevent information leak
<Files configtest.php>
order deny,allow
deny from all
allow from 127.0.0.1
</Files>
</Directory>
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:
Code:
DocumentRoot /var/www/roundcube
ServerName mail.lampxserver.com
ServerAdmin webmaster@localhost
ServerAlias webmail.*
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
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 127.0.0.0/255.0.0.0 ::1/128
</Directory>
<Directory /var/www/roundcube>
allow from all
Options +Indexes
</Directory>
Finally I created the DNS records by attaching an "A" record Host: subdomain webmail.example.com. IP: 192.168.10.180 (internal ip).