VirtualHost on Apache2

Alles, was den Apache betrifft, kann hier besprochen werden.

VirtualHost on Apache2

Postby blessleness » 21. May 2012 12:13

Hi everybody

I just configured a web server under Debian 6 in order to host many web sites on the same server. Until then, I've got 3 web sites that are working, "site1.com", "site2.com" and "site3.com".

J'ai made the DNS redirection to the IP address of my server, and activated my 3 sites using command a2ensite ... after creating the configuration file in the sites-available folder... The problem is, when I try to access my sites without the "www" (f.e. site2.com instead of www.site2.com) I always arrive on site1.com... Obviously, Apache2 takes always the first virtualhost...

What's the problem ? Do you have any idea ?

Thanks for your help
blessleness
 
Posts: 1
Joined: 21. May 2012 12:09
XAMPP Version: 5.6.3
Operating System: Linux Debian 6 64 bits

Re: VirtualHost on Apache2

Postby WilliL » 21. May 2012 12:27

I guess there's an error in your vhosts definition. If no virtual host fits, the first virtual host is used.
Willi
WilliL
 
Posts: 624
Joined: 08. January 2010 10:54
XAMPP Version: 5.5.19
Operating System: Win7Home Prem 64 SP1


Return to Apache

Who is online

Users browsing this forum: No registered users and 4 guests