Help! Apache not seeing VirtualHost

Help! Apache not seeing VirtualHost

Post by Alan Murrel » Wed, 11 Dec 2002 01:30:17


Red Hat 6.2
Apache 1.3.26
Summary: After setting up a particular Virtual Host in httpd.conf, I get the
default (first VirtualHost entry) instead of the site I setup.

(NOTE: IP addresses and domain names have been faked for the purposes of
this post.)

I am attempting to setup a webmail application (IlohaMail -  I decided to set it up as a seperate Virtual
host, just like that of the many other sites we host.  I put the contents
of the IlohaMail directory into '/websites/w/'.  The
actual index.php page, etc. are in a subdirectory called 'source', so I made
that the Document Root.  Here is the VirtualHost entry in my httpd.conf:

--- httpd.conf ---

    DocumentRoot /websites/w/
    TransferLog /var/log/http/
--- httpd.conf ---

It uses the global error_log for error logging.

The problem is that when I goto <> in my web
browser, instead of the webmail application, I get the first VortualHost in
my httpd.conf.  In my past experieince, this is consistent with DNS
pointing a site to the webserver, but Apache being unable to find it in the
httpd.conf (so it serves up the first VirtualHost instead).  However, there
is a proper httpd.conf entry (I have a script which does it all; I just
supply the first letter of the domain, the domain name and the script does
the rest; everything has worked fine with it until now.  Actually, the only
thing I had to tweak was the Document Root, as I had to make it the
'source' dirctory')

I am unable to determine why Apache cannot see the Virtual Host.  I have
even tried moving the VirtualHost entry to the top of the section, so it is
the first VirtualHost listed, but still the same problem.  I haven't tried
setting up a new VirtualHost (i.e., for a Customer, or whatever) yet, but I
should likely try that and see what happens.

In the meantime, and any help, ideas, guidance, etc. would be greatly



1. Default httpd.conf says Expected </VirtualHost> but saw </VirtualHost>

I apologise in advance if this is a stupid newbie question but it has me

I've just upgraded from 1.2.6 to 1.3.1 with mod_ssl/SSLeay.

With no changes to the default conf files (which all look fine thanks to
the wonderful configuration script) the server starts fine without SSL
but gives me:

Expected </VirtualHost> but saw </VirtualHost>

with apachectl startssl.

Just for fun I added a virtual host which is setup on our local DNS.


DocumentRoot /psci/usr/test
ErrorLog logs/test-error_log
TransferLog logs/test-access_log

Now I get the Expected </VirtualHost> without SSL as well.

After being so proud of getting it all installed, I'm back down to
Earth. What have I done?

Thanks for your time,


2. NFS mounting SGIs with Linux 2.0.18

3. New VirtualHosts not being seen

4. cmdtool/openlook

5. Help Compiling Apache 1.2.0 on Linux 2.0.27 == Help VirtualHost Cgi Directory

6. Translating your Windows Netscape profile to Linux

7. apache suexec not executing files from 2 users under 1 virtualhost

8. Login Fail

9. cgi-bin not visible to apache with virtualhosts

10. Apache VirtualHost not working

11. How do I NOT inherit refererlogs in VirtualHosts in Apache?

12. Apache not abiding by _default_ VirtualHost -- why?

13. apache not showing new VirtualHosts