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/somedomain.com and haul up what my local
> development site looks like.
[...]
> NameVirtualHost *:80
> <VirtualHost *:80>
>     ServerAdmin x...@ycc.com
>     DocumentRoot /var/www/html/roatanbakery.com
>     ServerName roatanbakery.com:80
[...]
> </VirtualHost>
[...]
> httpd -S reports:
> r...@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 roatanbakery.com (/etc/httpd/conf/httpd.conf:1001)
>          port 80 namevhost roatanbakery.com
> (/etc/httpd/conf/httpd.conf:1001)
>          port 80 namevhost ycc.com (/etc/httpd/conf/httpd.conf:1027)
> Syntax OK

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

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

Note that "roatanbakery.com" is the default virtual host, so any unknown
virtual server is treated as if you requested roatanbakery.com. 
Therefore by asking for localhost/roatanbakery.com you ask for
roatanbakery.com/roatanbakery.com 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 roatanbakery.com/roatanbakery.com
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, uh...@fantomas.sk ; http://www.fantomas.sk/
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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to