httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chandler <>
Subject Re: [users@httpd] Very old problem without any new solution
Date Thu, 19 Aug 2004 08:08:29 GMT
On Thursday 19 August 2004 01:50, Stanislas de Ionecum wrote:
> Ok,
> but you have not replied my question, I guess...
> I would to actually *allow* directory listing and allow to see *any*
> content. This means

Did you read the manual for mod_autoindex - and what did you not understand?
> if I enter:
> http://myvirtualsite
> I get Forbidden from IE and I get the localhost page from Mozilla, rather
> than myvirtualsite

I don't know what that is - but I have suspicions about how well 
works as a loopback interface.  See comments below about how to avoid using 
it. So ...

First question.  Does communications with actually work, and if so 
does the name myvirtualsite resolve to that address.

> NameVirtualHost
> NameVirtualHost
> <virtualhost>
> ServerName localhost
> DocumentRoot D:/local_site
> </virtualhost>
> <virtualhost>
> ServerName myvirtualsite
> DocumentRoot D:/pages_perso/websites/myvirtualsite
> </virtualhost>
> >From: Alan Chandler <>
> >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.

Second question.  Do you understand the difference between IP based virtual 
hosting and named based.  You could get away without needing IP address and used named based totally on

In /etc/hosts

make the line look like this  localhost myvirtualsite  

In you httpd.conf


<VirtualHost >
 ServerName localhost
 ServerName myvirtualsite

In the above - you could get at the site from outside by changing /etc/hosts 
to put you outside ip address and put several names for it in that line, and 
then replacing all the by * in the httpd.conf file as shown above.

What this tells apache, is do named based virtual hosting on ALL interfaces 
( and the external ip address of the machine). [ Although  you still 
need a DNS somewhere so that the client browser can resolve the virtual host 
name into the IP address of your machine]

Alan Chandler
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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message