Re: name based virtual hosting, apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 07 August 2003 10:25 pm, Iain Buchanan wrote:
> Name based virtual hosting seems to be slightly different between 
redhat
> 8.0 (httpd-2.0.40-11.5) and redhat 9 (httpd-2.0.40-21.3).
> 
> I'm trying to serve various domains, - the dns for each points to 
the
> one ip address.  The first one in my httpd.conf file is intended to 
be
> the default, as per the documentation, but it seems that all 
requests to
> any virtual hosts are served by the first one.
> 
> Basically this is what I'm doing (with more virtual hosts, but the
> effect is the same with two)
> 
> -------- from /etc/httpd/conf/httpd.conf
> NameVirtualHost *:80
> 
> #
> # VirtualHost example:
> # Almost any Apache directive may go into a VirtualHost container.
> # The first VirtualHost section is used for requests without a known
> # server name.
> #
> 
> <VirtualHost *>
>    DocumentRoot /usr/local/www/foo.bar/html
>    ServerName foo.bar
> 
>    # ...
> </VirtualHost>
> 
> 
> <VirtualHost *>
>    DocumentRoot /usr/local/www/bar.baz/data
>    ServerName bar.baz
> 
>    # ...
> </VirtualHost>
> --------
> 
> When I connect to, say, http://bar.baz/cgi-bin/script,
> /var/log/httpd/error_log says:
> "... script not found or unable to stat:
> /usr/local/www/foo.bar/cgi-bin/script"
> 
> notice how its pointing to the location for the default virtual 
host?

Do you have an 

Aliias /cgi-bin/ /usr/local/www/foo.bar/cgi-bin/

?

Global aliases carry into Virtual Hosts unless explicitly over-ridden 
inside the directive.

> Can anyone provide any insight to this?
> 
> Many thanks in advance,
> -- 
> Iain Buchanan <iain@xxxxxxxxxxxxxxxxxxx>
> 
> 
> -- 
> Shrike-list mailing list
> Shrike-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/shrike-list
> 
> 

-- 
Stephen Carville
------------------------------------------------------------------
Right wing socialists hate privacy as much as the left wing 
socialists hate guns.


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux