re: name based virtual hosting, apache

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

 



On Thu, 2003-08-07 at 22:25, Iain Buchanan wrote:
> <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"

You chose a poor example for your demo url, unless you set a new script
alias for each vhost, they will default to the main script alias. An
example from the dynamic mass vhost page at apache.org
(http://httpd.apache.org/docs-2.0/vhosts/mass.html):
NameVirtualHost 111.22.33.44
<VirtualHost 111.22.33.44>
  ServerName www.customer-1.com
  DocumentRoot /www/hosts/www.customer-1.com/docs
  ScriptAlias /cgi-bin/ /www/hosts/www.customer-1.com/cgi-bin
</VirtualHost>
<VirtualHost 111.22.33.44>
  ServerName www.customer-2.com
  DocumentRoot /www/hosts/www.customer-2.com/docs
  ScriptAlias /cgi-bin/ /www/hosts/www.customer-2.com/cgi-bin
</VirtualHost>
# blah blah blah
<VirtualHost 111.22.33.44>
  ServerName www.customer-N.com
  DocumentRoot /www/hosts/www.customer-N.com/docs
  ScriptAlias /cgi-bin/ /www/hosts/www.customer-N.com/cgi-bin
</VirtualHost>

-Josh

-- 
Joshua Legbandt <jtlegbandt@xxxxxxxxxxxxx>


-- 
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