httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] I cant get Apache to work without
Date Wed, 11 Dec 2002 09:33:00 GMT
I think you are mixing two problems together in one mail which is why
you are confusing me (and possibly others on the list). As I understand
it, your two problems are:

1) Can't get default DirectoryIndexing to work (aka trailing slash
2) Can't get name-based virtual-hosting to work (aka 5 servers problem)

Let's take them one at a time:

1) By default, apache looks for "index.html". If, however,
DirectoryIndex is set in a context that applies to the directory (i.e.
in any higher directory) then the default behaviour is switched off and
apache looks for the file(s) defined by DirectoryIndex. If it doesn't
find any, it checks for "Options Indexes" - if this is enabled, you get
a directory listing. If not, you get 403 Forbidden.

Check you don't have a rogue DirectoryIndex somewhere, e.g.

	  DirectoryIndex welcome.htm

at the server config level (i.e. outside any VH) will switch off the
default for all VHs...

In any case, it is not a bad idea to define DirectoryIndex - I don't
like to rely on defaults too much since it keeps things hidden and thus
is bad for self-documentation and maintenance. Just set it in the server
config - you don't need repeatedly to define it in each VH.

2) There's a big tutorial on NBVH in the docs which I'm not about to
rewrite. However, the general gist is:

- all FQDNs resolve to one IP (e.g.


  ServerName site1
  DocumentRoot /home/site1/html

  ServerName site2
  DocumentRoot /home/site2/html

...repeat as reqd.

I have been very explicit, setting "Listen" to the exact IP and port
(even though port 80 is default), and defining IP and port in the VH
containers. I prefer this since it keeps everything clear - you don't
have to follow...

I suspect you may have some server config level directives which are
upsetting defaults - check all the directives outside of VHs and ask
yourself what is it doing? and, does it really need to be there? 
In particular, get away from the idea of a "main server" - my feeling is
that as soon as you make one VH, you should put all sites in VHs. No VH
is "superior" to any other and having a "main server" defined outside a
VH just leads to confusing problems as directives "leak" into VHs (i.e.
VHs inherit some directives from server config level).

Let us know how you get on, BTW, what are you going to do with the four
machines you free up?


Owen Boyle

>-----Original Message-----
>From: Mike Rambour []
>Sent: Mittwoch, 11. Dezember 2002 09:56
>Subject: RE: [users@httpd] I cant get Apache to work without
>At 09:29 AM 12/11/2002 +0100, you wrote:
>>I can't quite understand your problem description... There is 
>no way you
>>need a separate *machine* for each website! You don't even need a
>>separate IP address... Read the docs about "Name based 
>virtual hosting".
>  I was aware of that I didn't need 5 machines for 5 domains 
>but that is 
>the way it was set up by the previous person in this job.  I 
>was trying to 
>change it and had read everything on virtual hosting, I could 
>find on the 
>web and even purchased 2 books which didn't help.
>>About the "trailing slash" problem - if apache is sent to a 
>URL without
>>a trailing slash and if it discovers that this URL is a directory, it
>  Sorry, I thought I was clear:
>   no trailing slash, it does not work
>   Trailing slash, it still does not work
>   /index.html  or joe.html worked.
>>- what you want to happen
>what I wanted to happen was 5 servers on the same machine
>>- how you tried to achieve it
>   name it and I tried it over 4 days of reading and 
>researching the web, 
>different versions of Apache, different DNS entries, rewrite 
>in httpd.conf, 
>playing with /etc/hosts and all kinds of params in the conf 
>file that I 
>didn't know existed, finally going with RedHat 8 to try and 
>get virtual 
>servers to work.
>   I got it to work this afternoon by using "DirectoryIndex 
>index.html" for 
>all 5 virtual host, I have never had to do that before but it 
>fixed it.  I 
>thought if I had that on the main server that it would work on 
>the virtual 
>servers but it works now.
>         mike
>~~~~~ I'd rather be sailing and  ~~~ .oooO  Oooo.  ~~~~~~~~~~~
>Mike Rambour                                   (    )  (     )    
>Bug Writer er...Programmer                \   )   (   / 
>                  \_)  (_/  
>If you want to learn more about the ULTIMATE BRITISH sports car,
>then take a look at
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message