PDA

View Full Version : Vhosts are not working (serving the same site)


baskin
11th June 2009, 17:44
I have created today a second site on my ISPconfig 3 server (opensuse 11.1).

After that i'm getting the following warning when restarting apache.

Thu Jun 11 17:39:03 2009] [warn] _default_ VirtualHost overlap on port 80, the first has precedence

The results is that only the first site is accessible by its URL (e.x. www.cywn.gr). When i try to access the second site (e.x. www.kernelit.gr) the pages stored on the first site are served.

The directories for the second site are created normally.

What should i check? Are the Vhosts broken?

Thank in advance.

baskin
11th June 2009, 18:20
I solved it!!!

I had to uncomment

NameVirtualHost *:80

in /etc/apache2/listen.conf

and add "www" in front of "ServerName" directive on both vhosts configuration files.

Should that have been done automatically by the ISPconfig system?

Off-topic: I found that i had to add

Alias /error/ "/srv/www/cywn.gr/web/error/"

on every vhost configuration file for the error pages to displayed correctly.

Hope these info helps you make ISPconfig better.

mgrandio
11th June 2009, 19:34
Hi,

You do not have to add manually www on vhost config file of your domain if in site configuration you put www or * in autosubdomain

baskin
12th June 2009, 21:38
Hi,

You do not have to add manually www on vhost config file of your domain if in site configuration you put www or * in autosubdomain

I figured it out later. :)