Apache : Name Based Virtual Hosts

The notable difference between IP-based and name-based virtual host configuration is the NameVirtualHost directive which specifies an IP address that should be used as a target for name-based virtual hosts.

For example, we use both http://www.abc.com and http://www.xyz.com at the IP address We simply add to one of the Apache configuration files:

ServerName http://www.abc.com
DocumentRoot /www/abc>
ServerName http://www.xyz.com
DocumentRoot /www/xyz

Of course, to make this work, all that is needed is to make sure that the names http://www.abc.com and http://www.xyz.com are pointing to the IP address

More information can be found at www.apache.org


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: