You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by yd...@21bc.com on 2001/06/10 05:16:12 UTC

i use linux+apache. how to create a cgi-bin directory for Virtual Host?

my system is build on linux+apache
now  i'm create virtual hosts.i change the 
config file (/opt/apache/conf/httpd.conf)like
this:
# get the server name from the Host: header
UseCanonicalName Off

# this log format can be split per-virtual-host based on the first field
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon

# include the server name in the filenames used to satisfy requests
VirtualDocumentRoot /www/hosts/%0/
VirtualScriptAlias  /www/hosts/%0/cgi-bin

 
 
now i try to browse the virtual host ,i can get http://www.1.com/test.htm (which is in /www/hosts/www.1.com/,) but can not get http://www.1.com/test.pl .(which is in /www/hosts/www.1.com/cgi-bin),the system can't find the file.
 
yet i can get http://localhost/cgi-bin/test.pl,(which is in /opt/apache/cgi-bin),why?
 
by the way,i need create many virtual host,so  i must do dynamic creating like above.