Name Based Virtual Hosts

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Name Based Virtual Hosts

Postby scrumpers » 16. November 2004 20:44

I have apachefiends running my guest house website under http and https but cannot get any name based vitual hosts working I add a section to the

<VirtualHost *>
DocumentRoot d:\apachefriends\xampp\htdocs\mydomain.co.uk
ServerName www.mydomain.co.uk
</VirtualHost>

but it stops all my sites working I get an error on start up stating using * ports and non-* ports with a name virtual host is unsupported

Any help would be appreciated
scrumpers
 
Posts: 5
Joined: 12. July 2004 12:49

Easy to fix

Postby taustin » 16. November 2004 20:58

Had the same thing. The basic issue is that the default set up for SSL (which is in ssl.conf, in the same directory as httpd.conf) sets Apache to listen on port 443 for SSL, which means all your virtual hosts need to be told to listen only on specific ports.

If you don't need to mess with the SSL stuff, the quick fix is:

Uncomment this line (just above the first VirtualHost setting)

NameVirtualHost *:80

(make sure it's got the *:80 at the end)

Then, make each VirtualHost tag look like this:

<VirtualHost *:80>

This tells Apache to only listen on port 80.

If you need to use SSL, look at
http://community.apachefriends.org/f/viewtopic.php?t=7614&highlight=ssl
taustin
 
Posts: 150
Joined: 24. September 2004 00:23
Location: Huntington Beach CA


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 103 guests