Virtual hosting enables you to configure your storage system to host several IP addresses using only one physical interface. Virtual hosting is useful if, for example, an Internet provider wants to host several Web sites but has only one physical interface.
When virtual hosting is enabled, an HTTP server uses the IP address pointed to by an incoming HTTP request to find the directory that contains the HTTP pages belonging to the virtual host.
To enable virtual hosting, perform the following tasks:
Data ONTAP redirects HTTP requests to the subdirectory and host or address listed in the /etc/httpd.hostprefixes file.
For more information about the vh interface, see the ifconfig(1) man page.
Assume that you added the following entry in the /etc/httpd.hostprefixes file:
/customer 192.225.37.102
/customer www.customer.com
If the HTTP server receives an HTTP request destined for one of its virtual host IP addresses, 192.225.37.102, the IP address is used to select the virtual host root directory, the /customer directory, from the /etc/httpd.hostprefixes file. An HTTP request with an HTTP 1.1 Host: header specifying www.customer.com is directed to the /customer directory. In either case, the requestor cannot get a file outside the /customer directory.