Table of Contents
Each virtual host has a corresponding subdirectory within the directory specified by the option httpd.rootdir. This subdirectory is called the virtual host root directory. Clients connected to a virtual host can only access files within the virtual host root directory.
In the httpd.hostprefixes file, each line consists of a virtual host root directory followed by the names and IP addresses of a virtual host. If you specify an IP address, the virtual host root directory is associated with the given virtual host for IP-level virtual hosting. If you specify a name, the virtual host root directory is associated with the virtual host with that name, using HTTP-level virtual hosting. If the node can resolve that name to an IP address, which is used for an IP-level host alias (see the alias option in na_ifconfig(1)), the node uses that IP address in the same way as it would if you specified the IP address in the httpd.hostprefixes file.
If the /etc/httpd.hostprefixes file is edited, it is read again by the HTTP server after the changes are saved.
2. Configure network interface with HTTP Virtual Host
Addresses. For example, to add the 18.104.22.168 as HTTP
Virtual Host address to the network interface e0a, enter
the following command:
toaster> ifconfig e0a alias 22.214.171.124
NOTE: In Data ONTAP 7.3 and later releases, VH interface is no longer supported for HTTP Virtual Hosting.
3. Edit /etc/httpd.hostprefixes file and map the Virtual
Host addresses to respective subdirectories within the
directory specified by the option httpd.rootdir. For
example, to map the Virtual Host address 126.96.36.199
specified in Step 2 above to the httpdir1 subdirectory
within httpd.rootdir, add the following entry to the
4. Test HTTP virtual host setup by sending HTTP request to the Virtual Host address added and mapped in Step 2 and 3 above.
/customer1 www.customer1.com /customer2 188.8.131.52
toaster> ifconfig e0a alias www.customer1.com
Table of Contents