1 (edited by burrezo 2013-03-11 01:47:00)

Topic: Solved: Apache Virtual Hosts & iRedMail 0.8.3 ??

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

Hi everybody,

I'm testing iRedMail and it's incredible how fast you can set up a fully featured mail server with this!

But, I've a problem, i've two domains, one server with one ip, and i need apache virtual hosts working... after installing iRedMail 0.8.3, my virtual hosts stop working, i get this when I restart apache:

Restarting web server: apache2[Sun Mar 10 00:05:37 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
 ... waiting [Sun Mar 10 00:05:38 2013] [warn] NameVirtualHost *:80 has no VirtualHosts

This is my /etc/apache2/httpd.conf

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@domain1.com
    DocumentRoot "/var/www/domain1.com"
    ServerName www.domain1.com
    ServerAlias domain1.com
    ErrorLog "/var/log/domain1.com-error_log"
    CustomLog "/var/log/domain1.com-access_log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@domain2.com
    DocumentRoot "/var/www/domain2.com"
    ServerName www.domain2.com
    ServerAlias domain2.com
    ErrorLog "/var/log/domain2.com-error_log"
    CustomLog "/var/log/domain2.com-access_log" common
</VirtualHost>

If i type www.domain1.com in my web browser, i only get a blank page.

Thank you for your help!!

2

Re: Solved: Apache Virtual Hosts & iRedMail 0.8.3 ??

No idea yet, config file looks just fine. Did you check other Apache config files?

Some references:
- http://httpd.apache.org/docs/2.2/vhosts/examples.html
- http://www.cyberciti.biz/faq/apache2-na … tualhosts/

3

Re: Solved: Apache Virtual Hosts & iRedMail 0.8.3 ??

My testing servir is in Hetzner,

I install Debian 6.0 LAMP (64bit), change a few things: no root ssh, prompt, hostname, hosts and config two virtual hosts, and everything works fine, then, i install iRedMail 0.8.3, mail works fine, BUT my virtual hosts stop working, only get blank pages when i type www.domain1.com or www.domain2.com in my web browsers, any ideas??

4

Re: Solved: Apache Virtual Hosts & iRedMail 0.8.3 ??

Hi burrezo,

Did you check other Apache config files? Any duplicate or messy (by iRedMail) settings?
Main config files are:

- /etc/apache2/apache2.conf
- /etc/apache2/conf.d/*
- /etc/apache2/sites-available/default-ssl

5

Re: Solved: Apache Virtual Hosts & iRedMail 0.8.3 ??

Ok, mistery solved!

I usually use an index.php example page por texting, whith this code:

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

And when iRedMail is installed, the conf file /etc/php5/apache2/php.ini is moddified, and phpinfo is added to 'disable_functions', so, the blank page.

Thank you.

6

Re: Solved: Apache Virtual Hosts & iRedMail 0.8.3 ??

OK, just updated iRedMail to mention disabled PHP functions in iRedMail.tips file:
https://bitbucket.org/zhb/iredmail/comm … d5dac8f07e