1

Topic: How to move Roundcube to subdomain?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
====

Hello,

I've installed iRedMail and Roundcube is accessible via https://domain.com/mail. I would like to make it accessible via https://mail.domain.com. How can I achieve this?

Thanks in advance for your help!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How to move Roundcube to subdomain?

Is it sufficient to delete the roundcubemail.conf in /etc/apache2/conf-available and to create a new Vhost?

3

Re: How to move Roundcube to subdomain?

alex42 wrote:

Is it sufficient to delete the roundcubemail.conf in /etc/apache2/conf-available and to create a new Vhost?

Please also remove the "Alias" line for Roundcube in /etc/apache2/sites-enabled/*

4

Re: How to move Roundcube to subdomain?

It has been no problem to deactivate the old configuration. Just disabled the conf (a2disconf roundcubemail.conf) and deleted the line in my default-ssl.conf

But sadly the subdomain doesn't load as expected. Instead of loading roundcube (subdomain: mail.domain.com), the main domain gets loaded (domain.com).

I've added to 2 Vhosts and enabled them:

<VirtualHost *:80>

 ServerName mail.domain.com
 ServerAlias mail.domain.com
 DocumentRoot /opt/www/roundcubemail/
 Redirect / https://mail.domain.com

</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>

 ServerName mail.domain.com
 ServerAlias mail.domain.com
 DocumentRoot /opt/www/roundcubemail/


 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /opt/www/roundcubemail/>
 Options +FollowSymlinks
 AllowOverride All
 Order allow,deny
 allow from all

</Directory>

SSLCertificateFile /etc/letsencrypt/live/domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

What am I doing wrong? Other subdomains are working as expected. Can you help me?

5

Re: How to move Roundcube to subdomain?

Found my error. Had an ServerAlias mail.domain.com in my default-ssl.conf.