NameVirtualHost * <VirtualHost *> ServerName host.domain.name <Location /> Order deny,allow Deny from all </Location> </VirtualHost> <VirtualHost *> ServerName www.domain.name # その他適当な設定 </VirtualHost>
みたいにすればいいんじゃないの?
489 :487 :01/11/08 15:04
>>488 おー!完璧!サイコー!
490 :名無しさん@お腹いっぱい。 :01/11/08 15:50
Solaris8でapache_1.3.22をインストールしたんですけど、CGIがうまく動作しません。 -------------------------------------------------------------- Method Not Allowed The requested method POST is not allowed for the URL /~public_html/cgi-bin/keiji.cgi. -------------------------------------------------------------- というエラーメッセージがでるのですが、どうすればいいのか教えてください。 。
apachectl status とやると「Forbidden」と出てしまうのですが、何が問題なのでしょう? 設定は Allow from 192.168.0. のようにやっているのですが、ブラウザの場合はこれで問題なく server-statusが見れたりします。 もちろん、Allow from all とやればコンソールでも見れるのですが…
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.