My Co-Authors

Vaishali Shah
Ivan Bayross

My Publishers

Shroff Publishers

I work with

SEEinfobiz Pvt. Ltd.

Web Directories

Directory India
Creating Virtual Host In Apache2 Under Windows PDF Print E-mail

A single http daemon can also be used to service to the main server and all its virtual hosts.


Name Based Virtual Hosts


Using the new name based virtual hosts is quite easy, and superficially looks like the old method.


The notable difference between IP-based and Name-based virtual host configuration is the NameVirtualHost directive.


This directive specifies a single IP address that should be used as a target for name-based virtual hosts. 


For example, suppose that both www.sharanam.com and www.ivan.com point to the IP address 172.16.9.66.


Then simply add the following to the Apache's httpd.conf:


ServerName 172.16.9.66


NameVirtualHost 172.16.9.66

<VirtualHost 172.16.9.66>

DocumentRoot c:\Sharanam

ServerName www.sharanam.com

</VirtualHost>

<VirtualHost 172.16.9.66>

DocumentRoot c:\ivan

ServerName www.ivan.com

</VirtualHost>


The Following entries should be appended to the hosts file available under C:\WINDOWS\system32\drivers\etc directory:


172.16.9.66 www.sharanam.com


172.16.9.66 www.ivan.com


After making any changes to the httpd.conf ensure that Apache is restarted to apply the new changes.


Click here to download the complete E-Book.

 

+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.
+/- Comments
Add New Search RSS

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 
Generated in 0.433623075485 Seconds