[vox-tech] apache question: virtualhost not working

Peter Jay Salzman vox-tech@lists.lugod.org
Sun, 11 Apr 2004 07:04:09 -0700


I'm playing around with the <virutalhost> directive.  A friend gave me
a domain name to "play with".  Up until this point, I've only had
dirac.org.

As a small test, I'd like to have this new domain, www.liberal.ws, point
to my linux pages.  Here's what I've tried:

   NameVirtualHost 64.142.25.39:80

   <VirtualHost www.liberal.ws:80>
      ServerAdmin p@dirac.org
      DocumentRoot /home/p/linux
      ServerName www.liberal.ws
      ErrorLog /var/log/apache/test_error
      LogLevel warn
      CustomLog /var/log/apache/test_access common
   </VirtualHost>

However, when I point my browser to this domain, I get my "normal"
documentroot, used by www.dirac.org, of /www.  Not my linux pages.

I know that apache is at least seeing this virtualhost stanza, because
the log files "test_error" and "test_access" are being created.
Furthermore:

   # apache -S
   VirtualHost configuration:
   64.142.25.39:80        is a NameVirtualHost
      default server www.liberal.ws    (/etc/apache/httpd.conf:807)
      port 80 namevhost www.liberal.ws (/etc/apache/httpd.conf:807)

So the virtual host is being seen.  It's just not using the DocumentRoot
that I want it to use.

Apache isn't something I've become proficient at.  Help?

Pete