run multiple sites using Apache or XAMPP in local

by Ramya 2011-08-02 14:36:30

run multiple sites using Apache or XAMPP in local:

Sometimes we are in need of using two sites under the same document root and we want both to be accessed from different urls.
In that case follow the steps below to handle multiple sites using Apache or XAMPP.

You can use either XAMPP or Apache:
* Browse "apache\conf\httpd.conf"
* Find the line "Listen", like the following
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
* Add another listen for your sites as
Listen 8080
* Open httpd-vhosts.conf
* Find the line,
"##
##ServerAdmin postmaster@dummy-host.localhost
##DocumentRoot "F:/xampp/htdocs/dummy-host.localhost"
.............."

* Uncomment and add your server details, like,

ServerAdmin postmaster@dummy-host.localhost
DocumentRoot "F:/xampp/htdocs/test1"
ServerName localhost:8080


* Restart apache.
* Open web browser and whenever you type "http://localhost:8080/", it will point to your test1 folder.


Likewise you can have upto 4 different sites....Razz


Tagged in:

795
like
0
dislike
0
mail
flag

You must LOGIN to add comments