httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matus UHLAR - fantomas <>
Subject Re: [users@httpd] VirtualHost & UseCanonicalName Off
Date Wed, 13 Jan 2010 09:35:35 GMT
On 01.01.10 13:39, Bill Gradwohl wrote:
> On my Fedora 12 laptop, I'm trying to set up a WEB site development
> environment to mimic my real web server that contains several virtual
> hosts. On my laptop I want the Apache server to respond to Firefox's
> requests to http://localhost/ and haul up what my local
> development site looks like.
> NameVirtualHost *:80
> <VirtualHost *:80>
>     ServerAdmin
>     DocumentRoot /var/www/html/
>     ServerName
> </VirtualHost>
> httpd -S reports:
> root@billlaptop # httpd -S
> VirtualHost configuration:
> wildcard NameVirtualHosts and _default_ servers:
> _default_:443          billlaptop.private.ycc
> (/etc/httpd/conf.d/ssl.conf:75)
> *:80                   is a NameVirtualHost
>          default server (/etc/httpd/conf/httpd.conf:1001)
>          port 80 namevhost
> (/etc/httpd/conf/httpd.conf:1001)
>          port 80 namevhost (/etc/httpd/conf/httpd.conf:1027)
> Syntax OK

> Via Firefox, if I key in
> 	http://localhost
> I get the web site on my box. If, however, I key in
> 	http://localhost/
> I get:
> Not Found

apparently there is no /var/www/html/
folder/file available.

Note that "" is the default virtual host, so any unknown
virtual server is treated as if you requested 
Therefore by asking for localhost/ you ask for which doesn't exist.

> My reading of the docs for UseCanonicalName Off says that this should
> work.

the UseCanonicalName only cares about server redirects. IF you turned it
off, you would apparently get error that
doesn't exist but the result would be the same.

> Trying to wget these virtuals also doesn't work, so I know its
> something to do with the Apache configuration, but I don't see what's wrong.

you can create virtual host named "localhost" pointing to
/var/www/html. Note that you'll be able to see any content under
that directory, unless you disable it other directives. 

Matus UHLAR - fantomas, ;
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
A day without sunshine is like, night.

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