Windows Linux Tips: Virtual hosts in Apache


twitter tips,twitter tricks,twitter tips and tricks,twitter latest updates,facebook tips and tricks,facebook tricks,facebook tips,Windows 7 Tips,Windows 7 tips and tricks,Windows 7 tips with staps,Windows XP Tips,Windows XP tips and tricks,Windows XP tips with staps,Windows Linux Tips,Windows Linux Tips and tricks

Apache, the popular Web server for Linux and Unix, allows you to host virtual hostnames with multiple IP
addresses. You can set one IP to each hostname. But what if you want to host multiple hostnames on a singleIP? Apache allows you to do it.

The trick is a single command that goes in the httpd.conf configuration file:

NameVirtualHost 1.2.3.4

Replacing 1.2.3.4 with your real IP address, this will allow Apache to know on which IP it should serve the
virtual hostnames. Then you can add the virtual commands for every 

hostname you want to host:
<VirtualHost virtual.host.com>ServerAdmin webmaster@virtual.host.com

DocumentRoot /home/httpd/virtual ServerName virtual.host.com</VirtualHost>

This will add virtual.host.com in your list of virtual hosts and serve 
the pages in /home/httpd/virtual.Ofcourse you need to have the actual virtual.host.com hostname pointing 
to that system.


"Windows Linux Tips: Virtual hosts in Apache"



Reference : techpraveen.com