Page 1 of 1

Multiple instance of XAMPP

PostPosted: 05. March 2009 09:33
by gstar
Hi,
I have a requirement to setup 2 different sites in one machine. I have done the following :

1. Installed 2 instances of XAMPP on the D drive.
2. Changed the apache port (D:\...xampp\apache\conf\httpd.conf) for the 2nd installation as :
Listen 8080
ServerName localhost:8080

What is to be done next? I tried starting the Apache/MySQL service through XAMPP Control Panel shortcut from desktop. This now starts the apache of the second installation. Now how do I start the apache service of the first installation (in port 80) ?

I am planning to share the same db for the same.

Please help?

TIA

Re: Multiple instance of XAMPP

PostPosted: 05. March 2009 09:43
by Izzy
You don't need 2 instances of XAMPP to run multiple sites and it is not recommended.

You would setup virtual hosts in xampp\apache\conf\extra\httpd-vhosts.conf file for as many web sites as you can think of using - I have 22 web sites set up in my vhosts configuration file running on only one XAMPP installation and all on port 80.

Do a forum search in the XAMPP for Windows forum for vhost or virtualhosts where you should find many working examples of multiple web sites on the one instance of XAMPP.

Re: Multiple instance of XAMPP

PostPosted: 05. March 2009 11:50
by gstar
Hi,

Just some doubts.
If I use virtual host will it affect my first installation?
Also the code for the sites are completely different, is this possible with using virtual hosts?

Thanks in advance

Re: Multiple instance of XAMPP

PostPosted: 05. March 2009 12:00
by Izzy
gstar wrote:If I use virtual host will it affect my first installation?
You only need one installation as I pointed out.
gstar wrote:Also the code for the sites are completely different, is this possible with using virtual hosts?
All my 22 web sites have different code, different domain names and different everything and that is the whole point of a virtualhost setup.

Do some Googling for virtualhost and read up on what virtual hosts is all about.

Read the documentation here:
http://httpd.apache.org/docs/2.2/vhosts/

Some examples here although orientated towards a Linux OS but you will get the idea.
http://httpd.apache.org/docs/2.2/vhosts/examples.html

And of course the best source of info on vhosts is here on this forum.