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