Forum Moderators: phranque

Message Too Old, No Replies

XAMPP for multiple websites

         

dougmcc1

1:29 am on Aug 31, 2006 (gmt 0)

10+ Year Member



Can XAMPP host multiple websites on the same Windows machine?

Anyone had experience with this or know a better alternative?

StupidScript

6:01 pm on Aug 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sure it can.

It's Apache, so whatever you set up in your httpd.conf file will behave just like on a 'normal' Apache box ... virtual hosts and all.

dougmcc1

3:40 pm on Sep 4, 2006 (gmt 0)

10+ Year Member



How do you use httpd.conf to host multiple websites on xampp?

StupidScript

4:51 pm on Sep 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look through your httpd.conf file until you find the following lines, and adjust them as you like:

NameVirtualHost *

<VirtualHost *>
ServerAdmin you@email.com
DocumentRoot C:\path\to\my-host\files
ServerName my-host.com www.my-host.com
</VirtualHost>

The DocumentRoot setting and its accompanying directives will handle the default site. Add a VirtualHost for each additional site you want to host. There are, of course, additional directives you may use within the VirtualHost container. Check out the documentation at apache.org , and read the comments in httpd.conf for more details.

Save httpd.conf and restart your Apache to make them active.

[edited by: StupidScript at 4:53 pm (utc) on Sep. 5, 2006]