httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Axel-Stephane SMORGRAV" <>
Subject RE: [users@httpd] httpd 2.0.54 VHost not working
Date Fri, 25 Jan 2008 15:24:33 GMT
De : anand nalya [] 
Envoyé : vendredi 25 janvier 2008 15:36
À :
Objet : [users@httpd] httpd 2.0.54 VHost not working

> Hi,
> I've Apache httpd version 2.0.54 on Redhat Linux Fedora 4. I'm trying to configure name
based virtual hosts on it. Here are the relavent fragments from the httpd.conf:
> DocumentRoot /var/www/html
> NameVirtualHost
> <VirtualHost>
>     DocumentRoot /var/www/html/sub
>     ServerName
> </VirtualHost>
> <VirtualHost>
>     DocumentRoot /var/www/html/www 
>     ServerName 
> </VirtualHost>
> The problem is that none of the virtual hosts is working.
> For example, when I request a document with Hostname as it returns files
from the default root /var/www/html. If the virtual host were working, then it should return
files from /var/www/html/sub. 
> Am I missing something??

Do you happen to have a Listen directive somewhere in the config for that address of yours?


Furthermore, are you sure that the request contains a host header with one of the VH servernames?

Try to type in the following at a shell prompt ($ is a prompt):

$ telnet 80
GET /index.html HTTP/1.1
Connection: close

Make sure to press CR twice after the last line. Make sure you have a file named index.html
in /var/www/html/www


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