1

Topic: Change URL of Roundcube/Cluebringer/IredAdmin

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MYSQL
- Linux/BSD distribution name and version:  Centos 6.5 64bit
- Related log if you're reporting an issue:
====

As the title. I want change to
domain.com/mail to mail.domain.com
domain.com/iredadmin to iredadmin.domain.com

I have set DNS record and virtualhosts for this and i can access mail in mail.domain.com
But whenever i go for mail.domain.com it is auto redirect to mail.domain.com/domain and domain.com auto redirect to domain.com/mail What happened, i tried to research 2-3 days with this problem but no result so i decided to post a question here.
Sorry for my bad english. smile

----

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

2

Re: Change URL of Roundcube/Cluebringer/IredAdmin

You should read Apache document to understand how to setup virtual host:
http://httpd.apache.org/docs/2.2/vhosts/

Set a correct DocumentRoot for your virtual host.

3

Re: Change URL of Roundcube/Cluebringer/IredAdmin

Thanks for reply. I did. Here is what i did

===================

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /var/www/roundcubemail/
    ServerName mail.my-domain.com
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /var/www/html/
    ServerName my-domain.com
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /var/www/iredadmin/
    ServerName iredadmin.my-domain.com
</VirtualHost>

===========

When i go mail.my-domain.com. It auto redirected to mail.my-domain.com/mail
When i go my-domain.com. It auto redirected to my-domain.com/mail
When i go iredadmin.my-domain.com. It redirected to Default Apache Site.

I think there is another configuration for this. Not only create Virtual host ...

4

Re: Change URL of Roundcube/Cluebringer/IredAdmin

*) Please move/delete/rename file '/var/www/html/index.html' first. it will redirect to http://[server]/mail/.
*) Your samples are virtual hosts accessible via HTTP://, not HTTPS://. So when you access HTTPS://, you're visiting other virtual hosts not listed in your samples.

5

Re: Change URL of Roundcube/Cluebringer/IredAdmin

Thanks. I remove index.html file
Now i can access mail.my-domain.com without being autoredirected to mail.my-domain.com.mail
How i can turn off HTTPS for iredadmin? and what is exactly DocumentRoot for Iredadmin for setting Virtual hosts? smile

6

Re: Change URL of Roundcube/Cluebringer/IredAdmin

unholyknightz wrote:

How i can turn off HTTPS for iredadmin?

Don't do it.

unholyknightz wrote:

and what is exactly DocumentRoot for Iredadmin for setting Virtual hosts?

You already use the correct one, /var/www/iredadmin.

7 (edited by JeeGee 2014-11-21 04:00:55)

Re: Change URL of Roundcube/Cluebringer/IredAdmin

Indeed! Reading this, I also want to say that you don't want to turn off HTTPS.
Even better is to redirect everything on 80 to 443.

Nice idea of using iredmail.domain.com instead of www.domain.com/iredmail
But then you need a A record in DNS and thus can be lookup easy.
As the ireadadmin interface uses UID and password, it could that you are a target for hackers.
What I would do in this kind of situations is using exta logins with htaccess. Yes the you have to log in twice,
but makes it harder to directly attack the application.

If you only connect from the same source, then use rules in the virtual host, order allow deny, that stuff.
And configure that only your IP can connect.

Well, just my thoughts. Trying to secure some things.

8 (edited by unholyknightz 2014-11-21 16:10:51)

Re: Change URL of Roundcube/Cluebringer/IredAdmin

Thanks for reply. I'm trying to create Virtual hosts HTTPS for iredadmin, but i don't know how to do it exactly.

When i'm trying to do it, this error appears

========

[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

========


Here is my Config in httpd.conf :

==============

NameVirtualHost *:443

<VirtualHost *:443>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /var/www/iredadmin/
    ServerName iredadmin.my-domain.com
</VirtualHost>

==============

what i am doing wrong? smile. I'm not expert in this so forgive me smile

9

Re: Change URL of Roundcube/Cluebringer/IredAdmin

Why not check /etc/httpd/conf.d/ssl.conf for example?
Addition tutorial: http://httpd.apache.org/docs/2.2/mod/mod_ssl.html

10 (edited by unholyknightz 2014-11-22 10:05:58)

Re: Change URL of Roundcube/Cluebringer/IredAdmin

Yay. I did it.Now i can access Iredadmin and Clubringer by
iredadmin.my-domain.com/iredadmin
iredadmin.my-domain.com/cluebringer
Now i'm trying to access iRedadmin only by iredadmin.my-domain.com/ :3
:3