Port 80 Listen 80 Listen 1234 <VirtualHost *> Deny from all Allow from 127.0.0.1 Allow from 192.168.0.0/24 DocumentRoot /path/to/80 </VirtualHost> <VirtualHost *:1234> DocumentRoot /path/to/1234 </VirtualHost>
<VirtualHost *> DocumentRoot "/usr/local/apache/htdocs" <Directory /> Deny from all Allow from 127.0.0.1 Allow from 192.168.0.0/24 Options FollowSymLinks AllowOverride None </Directory> <Directory /home/*/public_html> Options Indexes AllowOverride All </Directory> </VirtualHost>
<VirtualHost *:1234> DocumentRoot "/usr/local/apache/htdocs" <Directory /> Allow from all Options FollowSymLinks AllowOverride None </Directory> <Directory /home/*/public_html> Deny from all AllowOverride None </Directory> <Directory /home/*/public_html/docs> Allow from all Options Indexes AllowOverride All </Directory> </VirtualHost>
<Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Indexes Options All <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </LimitExcept> </Directory>
/home/hiroyuki/public_htm/bbsに置いたcgiをブラウザから開くと
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
こうなって/var/log/httpd-error.logには
[Wed Dec 5 03:17:31 2001] [error] [client 192.168.0.2] Premature end of script headers: /home/hiroyuki/public_html/bbs/light.cgi
Premature end of script headers: /home/hiroyuki/public_html/bbs/light.cgi Can't locate ./jcode.pl in @INC (@INC contains: /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd / usr/local/lib/perl5/site_perl/5.005 .) at /home/naoya/public_html/bbs/light.cgi line 34.
|| Forbidden || You don't have permission to access /cgi-bin/ on this server. || || -------------------------------------------------------------------------------- || Apache/1.3.20 Server at node01.1ch.tv Port 80
を追加して # /etc/rc.d/init.d/httpd restart したら Stopping httpd: [ OK ] Starting httpd: [Fri Dec 21 14:47:57 2001] [warn] VirtualHost 210.255.82.203:80 overlaps w ith VirtualHost 210.255.82.203:80, the first has precedence, perhaps you need a NameVirtua lHost directive [ OK ] というメッセージが出ました。
ええと、httpd restartしたところ >Starting httpd: [Fri Dec 21 14:47:57 2001] [warn] VirtualHost 111.111.111.111 overlaps with VirtualHost 111.111.111.111, >the first has precedence, perhaps you need a NameVirtualHost directive というメッセージが出たので、