[Apache-Users 3588] 特定CGIが動作しません
足 立
adachi_hige @ hotmail.com
2004年 1月 12日 (月) 17:30:18 JST
はじめまして、足立といいます。
過去ログを見させていただいていますが似たようなものがみつからないので質問させ
ていただきます。
~以下のcgi-binでcgiを実行するところまでできていますが、簡易的なものや掲示板
は動作するのですが、
CGIゲームが正常に動作しません。エラーは出ていないのですが誤動作します。
設置例(画像はわざとアップしていません。無改造です。)
レンタルサーバー設置例 http://adachihg.gi-ga.net/godfield/godfield.cgi
自宅サーバー設置例
http://juvenile-a.dynsite.net/~gamekan/cgi-bin/godfield/godfield.cgi
※レンタルサーバーと同じになっていないといけないのですが、logファイルに1と0
の変なデータが混ざってしまいます。
自宅サーバー掲示板設置例
http://juvenile-a.dynsite.net/~gamekan/cgi-bin/MAINBBS/wforum.cgi
レンタルサーバーを借りている実績は長いのでCGI側の設定に問題はないと思いま
す。FTP側は、今までの設定をそのまま流用しているのと、掲示板が動作するので多
分問題はないと思います。念のため、ゲームのほうをFFFTP(vsftpd)と
WinSCP(openssh)でアップして比較しましたが、同じ結果でした。
なにが悪いのかさっぱりわからないです。ご教授いただけたらうれしいです。どう
か、よろしくお願いします。
※ちなみにLinux暦3ヶ月の初心者ですがこちらに投稿してくださいということです
ので投稿します。レベル的に低いのですがいろいろ検索して何とかここまでこれまし
た。あと一押しを僕にください。
★★★ 参考資料 ★★★
自宅サーバー環境
RedHat9 apache1.3.29 vsftpd-1.1.3-8 openssh-3.5p1-11
※但し、apache2.0.40-21.9インストール済みで敷居が高く感じたので削除まではし
ていませんが停止しています。その後、本家よりapache1.3.29をDLしmakeしていま
す。
※CGIゲームができるサーバーの構築を目指しています。
####################################
/usr/local/apache/conf/httpd.conf 抜粋
※コメント部分除去(コメントアウト部位は残してあります)
####################################
ServerType standalone
ServerRoot "/usr/local/apache"
#LockFile /usr/local/apache/logs/httpd.lock
PidFile /usr/local/apache/logs/httpd.pid
ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard
#ResourceConfig /usr/local/apache/conf/srm.conf
#AccessConfig /usr/local/apache/conf/access.conf
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
#Listen 3000
#Listen 12.34.56.78:80
#BindAddress *
# Example:
# LoadModule foo_module libexec/mod_foo.so
#ExtendedStatus On
Port 80
User nobody
Group nobody
ServerAdmin adachi_hige @ hotmail.com
ServerName juvenile-a.dynsite.net
DocumentRoot "/usr/local/apache/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/usr/local/apache/htdocs">
Options FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig
Options MultiViewsSymLinksIfOwnerMatch IncludesNoExec
Order allow,deny
Allow from all
</Directory>
<Directory /home/*/public_html/cgi-bin/>
Options ExecCGI
SetHandler cgi-script
</Directory>
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>
AccessFileName .htaccess
#<Files ~ "^\.ht">
# Order allow,deny
# Deny from all
# Satisfy All
#</Files>
#CacheNegotiatedDocs
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig /usr/local/apache/conf/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/apache/conf/magic
</IfModule>
HostnameLookups On
ErrorLog /usr/local/apache/logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /usr/local/apache/logs/access_log common
CustomLog /usr/local/apache/logs/referer_log referer
CustomLog /usr/local/apache/logs/agent_log agent
CustomLog /usr/local/apache/logs/access_log combined
ServerSignature On
# EBCDICConvertByType On=InOut text/* message/* multipart/*
# EBCDICConvertByType On=In application/x-www-form-urlencoded
# EBCDICConvertByType On=InOut application/postscript model/vrml
# EBCDICConvertByType Off=InOut */*
<IfModule mod_alias.c>
Alias /icons/ "/usr/local/apache/icons/"
<Directory "/usr/local/apache/icons">
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /manual/ "/usr/local/apache/htdocs/manual/"
<Directory "/usr/local/apache/htdocs/manual">
Options FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
# <Directory "/usr/local/apache/cgi-bin">
# AllowOverride FileInfo AuthConfig
# Options FollowSymLinks MultiViews ExecCGI
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
# </Directory>
</IfModule>
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz
ReadmeName README
HeaderName HEADER
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
</IfModule>
<IfModule mod_mime.c>
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-TW .zh-tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru
ltz ca es sv tw
</IfModule>
AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
#AddType application/x-compress .Z
#AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi .pl
#AddType text/html .shtml
#AddHandler server-parsed .shtml
#AddHandler send-as-is asis
#AddHandler imap-file map
#AddHandler type-map var
</IfModule>
#MetaDir .web
#MetaSuffix .meta
#ErrorDocument 500 "The server made a boo boo.
#ErrorDocument 404 /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
#ErrorDocument 402 http://www.example.com/subscription_info.html
<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0
force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .example.com
#</Location>
#<Location /cgi-bin/phf*>
# Deny from all
# ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
#</Location>
#NameVirtualHost *:80
#<VirtualHost *:80>
# ServerAdmin webmaster @ dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
####################################
/etc/vsftpd/vsftpd.conf抜粋
####################################
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
#chown_username=whoever
#xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
#idle_session_timeout=600
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
ascii_upload_enable=YES
ascii_download_enable=YES
#ftpd_banner=Welcome to blah FTP service.
#deny_email_enable=YES
#banned_email_file=/etc/vsftpd.banned_emails
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
ls_recurse_enable=YES
pam_service_name=vsftpd
#userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES
local_root=public_html
use_localtime=YES
_________________________________________________________________
友達と24時間ホットライン「MSN メッセンジャー」、今すぐダウンロード!
http://messenger.msn.co.jp
Apache-Users メーリングリストの案内