Virtual web sites and and older browsers

Virtual web sites and and older browsers

If you are using virtual websites, you
should be aware that this feature is HTTP 1.1 specific and will not work with older
browsers.  This article discusses an option which you can use to access to your
virtual websites for users with non-HTTP 1.1 browsers.

The following resources will
probably help you to understand this issue.  I didn’t find them much help in solving
this issue, but they did provide useful insight.

Apache name-based Virtual Host Support

Using the ServerPath directive

Details of name-based virtual hosts

Name based virtual hosts use a feature of the HTTP 1.1 protocol which
involves sending the host name from the client to the server.  The server uses this
name to determine which virtual website to display.  This host name must appear in
httpd.conf as a ServerName entry in one of the virtual host entries.  The
default web site will be supplied if no match is found.

HTTP 1.0 browsers do not send
the host name.  In this case, the default web site will be displayed.

What do HTTP 1.0 browsers see?

To test what older browsers will see, enter your web server’s IP address
into your browser.  That should show you.

See also Virtual
websites – what non-HTTP/1.1 compatible browsers will see
for more detail.

A solution

My solution was to create a new virtual host and put it in front of all
other virtual hosts.  Here’s the entry:

    DocumentRoot        /www/default
    ErrorLog            /www/logs/default-error.log
    CustomLog           /www/logs/default-access_log common

The next step is to create symbolic links from within /www/default to your
various virtual websites.  See also Creating a symbolic link.
  I recommend creating a single page for your default website.  See for what I did.

Remember to add a DNS entry for

A quick and dirty solution

Another way you can do this is this:

    DocumentRoot        /www/
    ErrorLog            /www/logs/default-error.log
    CustomLog           /www/logs/default-access_log common

This assumes all of your websites are located in /www.  If this is the
case, then older browsers will see a directory listing of all the websites.  This
will work, but it’s not pretty.

Leave a Comment

Scroll to Top