httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chandler <a...@chandlerfamily.org.uk>
Subject Re: [users@httpd] Very old problem without any new solution
Date Tue, 17 Aug 2004 22:19:16 GMT
On Tuesday 17 August 2004 23:05, Stanislas de Ionecum wrote:
...
>
> Also notice that the difference between
>
> NameVirtualHost 127.0.0.1
> NameVirtualHost 127.0.0.2
> <virtualhost 127.0.0.1>
> ...
> </virtualhost>
> <virtualhost 127.0.0.2>
> ...
> </virtualhost>
>
> and
>
> NameVirtualHost 127.0.0.1
> <virtualhost 127.0.0.1>
> ...
> </virtualhost>
> <virtualhost 127.0.0.1>
> ...
> </virtualhost>
>
> does not matter.
>
> Some questions follow:
> 1) The server works well in both ways. So the result is the same, but
> **what is the best configuration**?? The first or the second??

There are two sorts of virtual hosting IP based and named based.  You only 
need to use NameVirtualHost to specify on which interfaces on the machine you 
will be using named based virtual hosting.

In the second example you have missed an interface out, but are still 
specifying the IP address in the <VirtualHost> block which is how IP based 
virtual hosting works.

There are pros and cons to each.  IP based works in a wider range of 
circumstances (you can use SSL for instance, and VERY old browsers work with 
it).  Named based only needs a single IP to work - so is normally prefered if 
the other constraints (no SSL, no old browsers) are not a problem

>
> 2) How can I allow directory listing? I want allow it. I tried to comment
> the DirectoryIndex directive, but it does not work.
>
>

DirectoryIndex tells which file to server rather than do a directory listing.  
Make sure the file which the Directory Index refers to is not there.


-- 
Alan Chandler
alan@chandlerfamily.org.uk
First they ignore you, then they laugh at you,
 then they fight you, then you win. --Gandhi

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message