Setting up virtual hosts with Apache2.2 is very straight forward and could be done in less than 5 minutes. Although, your local Apache2.2 server will still work even if virtual hosts are not configured. You might want to ask, is there a need for my local Apache2.2 setup to configure virtual hosts? Apparently, virtual hosts are needed when
* your on multiple domains
* your need to test your projects with same configuration with the server
* test your projects without touching your public server
* your just organizing your projects into groups
* or setup a local copy of your blog or website
What do we need?
Actually , i would prefer individual installation rather than WAMP or XAMPP package.
Install apache2.2 ,php and Mysql into your c:\www. Usually its a better practice for storing file in to specific selected path like c:\www or d:\www
Installation something like this
1. c:\www\Apache2.2 - Apache files
2. c:\www\php - PHP files
3. c:\www\zend - PHP Zend Files
4. c:\www\public_html - html/php files (this is your website root)
Configuring Apache2.2 to accecpt Virtual Hosts
1. Got to your Apache folder which is under c:\www\Apace2.2 and locate the conf files. The are usually located at c:\www\apache\conf
2. Open the file named httpd.conf with a text editor
3. if u want u can add all virtual host(multiple domain, subdomain) things on here otherwise u just include httpd-vhosts.conf file and add your settings there before that just comment it what ever documentroot and server root configuration at the httpd.conf cos virtual hosting setting to be placed inside the httpd-vhosts.conf file.
example
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
2. Open the file named c:\www\Apache2.2\conf\extra\httpd-vhosts.conf with a text editor
3. If posible read the instructions so may have the idea on what you are doing
4. Now paste the following code at the bottom of the file without touching the document.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost www.iatahni.com:80>
DocumentRoot "C:/WWW/public_html"
ServerName www.iatahni.com
ServerAlias www.iatahni.com
ErrorLog logs/iatahni/host1.iatahni.com-error_log
CustomLog logs/iatahni/host1.iatahni.com-access_log common
Options -FollowSymLinks -Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
NameVirtualHost wap.iatahni.com:80
<VirtualHost wap.iatahni.com:80>
DocumentRoot "C:/WWW/public_html/wap"
ServerName wap.iatahni.com
</VirtualHost>
<VirtualHost www.iramaku.com:80>
DocumentRoot "C:/WWW/public_html/iramaku"
ServerName www.iramaku.com
ServerAlias www.iramaku.com
ErrorLog logs/iramaku/host2.iramaku.com-error_log
CustomLog logs/iramaku/host2.iramaku.com-access_log common
Options -FollowSymLinks -Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
for multiple, add similar like
Thats All ~~ Shared Web Hosting (Multiple domain) / Subdomain
Enjoy !!
Cheeeeeeeers
venkat

