1

Topic: Change from example.com/mail to mail.example.com

==== Required information ====
- iRedMail version 0.9.5-1:
- Ubuntu 16.04 LTS
- MySQL
- Apache o
- Manage mail accounts with iRedAdmin Free
====

Hi Guys,

I need to move the roundcube webmail location from yourdomain.com/mail to mail.yourdomain.com.

I need a way to do this so that addresses still read postmaster@yourdomain.com, and not postmaster@mail.yourdomain.com.

I realize that this requires setting up a subdomain or virtual host and then building a symlink or something between that and roundcube. Unfortunately i'm still a bit of a linux noob so detailed instructions and code snippets will be MOST helpfull!

Help a guy out,

Thanks.

----

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

2

Re: Change from example.com/mail to mail.example.com

elaubscher wrote:

I need to move the roundcube webmail location from yourdomain.com/mail to mail.yourdomain.com.

You need to setup a new virtual web host with Apache for domain "mail.yourdomain.com". You have to do some practice:
https://httpd.apache.org/docs/2.4/vhosts/examples.html

Actually, it's easy. Test it with a testing machine or virtual machine.

3

Re: Change from example.com/mail to mail.example.com

Thanks,

I understand that i need to set up a virtual host, but the page you are pointing me to assumes that i know where to start. A more tutorial type response would be more helpfull.

Maybe some instructions more accessible to a beginner would be more helpful?

But thanks for the quick reply, maybe you've got some more insights on where to start?

4

Re: Change from example.com/mail to mail.example.com

You can find config files on this page:
http://www.iredmail.org/docs/file.locations.html

On Ubuntu 16.04 with Apache, you should add a new file under /etc/apache2/conf-available/. for example, mydomain.conf. add the required settings for a virtual web host (check the link in my previous reply), then enable it with command "a2ensite mydomain", restart Apache service. Open a web browser to test it. smile

5

Re: Change from example.com/mail to mail.example.com

Thank you,

That helps. i've added the *example*.conf file to /etc/apache2/conf-available/*example*.conf


Listen 80
<VirtualHost *:80>
    DocumentRoot "/www/*example*"
    ServerName www.*example*.com

    # Other directives here
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/www/mail"
    ServerName mail.westcoastcivils.co.za

    # Other directives here
</VirtualHost>

Now i assume i need to set create the "Mail" and "*example*" directories in /var/www#  ?

6

Re: Change from example.com/mail to mail.example.com

FYI, bought you a cup of coffee as enticement to take me through this process. And i'll do so again if i come right with your help.

7

Re: Change from example.com/mail to mail.example.com

elaubscher wrote:

Now i assume i need to set create the "Mail" and "*example*" directories in /var/www#  ?

You should make sure the directory specified in "DocumentRoot" exist with correct owner/group and permission.

elaubscher wrote:

FYI, bought you a cup of coffee as enticement to take me through this process. And i'll do so again if i come right with your help.

Bait? hmm.

Anyway, thanks for buying me coffee. smile