1

Topic: name based virtual hosts

==== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: OpenSUSE 12.3
- Related log if you're reporting an issue:
====

I'd like to use name based virtual hosts on this server however it automatically redirects port 80 to port 443.

I've seen many posts on this issue but none seem to fit my exact situation.  All the iRedmail pages work fine and I don't want to break that,  just want to be able to enable name based virtual hosts so that I can load up other websites.

is there a known procedure for doing this after iRedmail takes over the apache2 conf files?

it seems, (given the /etc/apache2/vhosts.d/ip-based_vhosts.conf) that apache2 is configured or IP based virtual hosts.

I've removed the section from /etc/apache2/vhosts.d  for <VirtualHost *:80> and put in my own vhosts conf file in:

/etc/apache2/vhosts.d/main.conf

<VirtualHost *:80>
    UseCanonicalName On
    ServerAdmin admin@mydomain.com
    DocumentRoot "/srv/www/htdocs/mydomain.com"
    ServerName www.mydomain.com
    ServerAlias mydomain.com
    ErrorLog "/var/log/apache2/mydomain.com-error_log"
    CustomLog "/var/log/apache2/mydomain.com-access_log" common
</VirtualHost>

then restarted the apache2 service

from inside the nework www.mydomain.com redirects automatically to www.mydomain.con/mail
from outside I get nothing... DNS settings appear to be correct as pinging to www.mydomain.com gets a proper ip address.

what am I missing here?

----

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

2

Re: name based virtual hosts

iRedMail creates file /srv/www/htdocs/index.html to redirect web access to /mail by default, does rename this file solve your issue?

3

Re: name based virtual hosts

Yes, i found that and did replace it. 

The servers till however will only accept SSL (https) connections and seems to ignore vhost config files pointing to anything but /srv/www/htdocs/

https://www.mydomain.com/ works
http://www.mydomain.com/ doesn't

4

Re: name based virtual hosts

iRedMail configures Roundcube to use only HTTPS by default, you can try to change 'force_https' parameter in its config file:

$rcmail_config['force_https'] = false;