Jan 011999
 

Virtual websites – what non-HTTP/1.1 compatible browsers will see

See also Apache topics.

This section deals with virtual websites and what a non-HTTP/1.1 compatible browser will see if it tries to navigate to a virtual website.  For a virtual website definition, I think the Apache site contains a useful explanation.

What I did

I stumbled upon this problem when I was adding some new domains to my system.  For information on how to create a virtual website, see Apache – virtual hosts.  I had created the directory which contained the HTML files.  I’d created the DNS entry.   But when I navigated to that URL, all I saw is a bunch of directories, not the website.  See http://ww3.freebsddiary.org/ for an example of this.   This is what  non-HTTP/1.1 compatible browsers will see

What I did wrong

I did not add the following to /usr/local/etc/apache/httpd.conf
<VirtualHost 11.22.33.44>
   DocumentRoot /usr/local/www/data/freebsddiary
   ServerName ww3.freebsddiary.org
</VirtualHost>

The above situation actually occurred when I was working with http://test.freebsddiary.org/ but the example was so good I decided to keep it as http://ww3.freebsddiary.org/.   The only major difference between these two URLs is the missing entry as described above.