Setting up roundcube to webmail.domain.com as default for domains in DirectAdmin

You need to setup the virtualhost for apache2.
[root@ck]# cd /usr/local/directadmin/data/templates
[root@ck]# cp virtual_host2.conf custom
[root@ck]# cd custom

Now you can edit the new virtual_host2.conf (apache 2) file in custom folder and just add the codes to the end.
ServerName webmail.|DOMAIN|
ServerAdmin |ADMIN|
DocumentRoot /var/www/html/roundcube
CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes
CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log


Simply save and exit. Then run below to rewrite the httpd.conf files.
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

Finally you need to setup dns part.
[root@ck]# cd /usr/local/directadmin/data/templates
[root@ck]# cp dns_a.conf custom
[root@ck]# cd custom
[root@ck]# echo "webmail=|IP|" >> dns_a.conf

Note: Please check custom folder if there is a file with dns_a.conf name. Also dont forget that is only setup webmail A record for new domains. For existing domains, you’ll have to add manually. Source: DirectAdmin
  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

Adding New IP to DirectAdmin From Different Subnet and Gateway

Earlier I’ve posted an article describing how to add multiple ip addresses on a single...

PHP-SOAP Installation on DirectAdmin

People using Direct Admin usually do the mistake to install anything new by using the yum...

Directadmin : Problem Receiving Emails – The “Unknown User” Issue

If you get a 550 error as a reply when you email a user with directadmin, saying Remote host...

How to Reset DirectAdmin “admin” Password

DirectAdmin determines the admin password during installation and saves these passwords into the...

MySQL root password recovery in DirectAdmin

Before changing MySQL root password you may try to recover default installation password....