httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jez Hancock <>
Subject Re: [users@httpd] servername in VirtualHost
Date Tue, 09 Mar 2004 06:50:25 GMT
On Tue, Mar 09, 2004 at 12:06:58AM -0400, romeo wrote:
>  If I visit my local site with it's domain and a trailing slash
> ( )all links are ok. It shows me a "fancy" index ( i have 
> no index file in there).
> But if I visit the links go to

This is no surprise, you're asking apache for the file called 'b' that
resides in the document root - unless you put a trailing '/' on the
request, you won't get the directory contents of 'b'.  

> I have one virtual host defined, I think that the server should use the 
> servername in the Vhost to create the autoreferencing link in the second 
> case. Right? Thanks in advance for your comments. Bye.
> httpd.conf:
> no listen directives
> no bindaddress
> port 80

If you have virtual host entries set up you can remove this from the
main part of the config file:
> ServerName

In any event it doesn't make a lot of sense anyway - f you really want
something like this use: 

ServerName localhost

> UseCanonicalName Off
> ### Section 3: Virtual Hosts

Change this to the _IP address_ (NOT fully qualified domain name) you
want to do name based vhosting on:
> NameVirtualHost

ie if you just want to use any available address:port, use:

NameVirtualHost *:*

Change this to the interface you want to host the vhost on:
> <VirtualHost>

ie if you want to host it on any available address:port, use:

<VirtualHost *:*>

>     ServerAlias *
>     ServerAdmin admin@my.domain
>     DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"
>     ServerName
> </VirtualHost>

Jez Hancock
 - System Administrator / PHP Developer  - Another FreeBSD Diary        - ipfw peruser traffic logging

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