Note

Some older browsers are unable to see name-based virtual hosts because this is a feature of HTTP 1.1 and the older browsers are strictly HTTP 1.0compliant. However, many other older browsers are partially HTTP l.lcompliant, and this is one of the parts of HTTP 1.1 that most browsers have supported for a while.

Name-based virtual hosts require just one step more than IP address-based virtual hosts. You must first indicate which IP address has the multiple DNS names on it. This is done with the

NameVirtualHost directive:

NameVirtualHost 212.85.67.67

You must then have a section for each name on that address, setting the configuration for that name. As with IP-based virtual hosts, you need to set only those configurations that must be different for the host. You must set the serverName directive because it's the only thing that distinguishes one host from another:

<VirtualHost 212.85.67.67>

ServerName bugserver.gnulix.org

ServerAlias bugserver

DocumentRoot /home/bugserver/htdocs

ScriptAlias /home/bugserver/cgi-bin

TransferLog /home/bugserver/logs/access_log

</VirtualHost>

<VirtualHost 212.85.67.67> ServerName pts.gnulix.org ServerAlias pts DocumentRoot /home/pts/htdocs ScriptAlias /home/pts/cgi-bin TransferLog /home/pts/logs/access_log ErrorLog /home/pts/logs/error_log </VirtualHost>

Was this article helpful?

0 0

Post a comment