Apache/1.2.6 PHP/FI-2.0を使用します。
[access.conf]は、公開制御を指定したり、各種操作の許可と制限を指定するファイルです。
デフォルトでは、CGI、SSIの機能が制限されているので、有効にするようにします。
--- access.conf Tue Apr 13 17:53:39 1999 +++ access.conf Fri Apr 16 16:33:28 1999 @@ -20,13 +20,13 @@ # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you (or at least, not yet). -Options Indexes FollowSymLinks +Options FollowSymLinks ExecCGI Includes # This controls which options the .htaccess files in directories can # override. Can also be "All", or any combination of "Options", "FileInfo", # "AuthConfig", and "Limit" -AllowOverride None +AllowOverride ALL # Controls who can get stuff from this server. @@ -40,7 +40,7 @@ <Directory /home/httpd/cgi-bin> AllowOverride None -Options ExecCGI +Options ExecCGI Includes </Directory> # Allow server status reports, with the URL of http://servername/server-status
Options ディレクトリごとに利用可能な機能を指定します。 FollowSymlinks:シンボリックリンクを参照可能にします。 ExecCGI:CGIを許可します。 Includes:SSIを許可します。 AllowOverride ディレクトリの[.htaccess]の指定を[access.conf]の指定より優先させるかどうか指定します。 優先させる場合は、 AllowOverride ALL とします。
[srm.conf]は、提供する文書を置くディレクトリ、CGIスクリプトを置くディレクトリなどを指定するファイルです。
デフォルトでは、CGIとSSIの拡張子のタイプが指定されていないようなので、指定します。
--- srm.conf Tue Apr 13 17:53:52 1999 +++ srm.conf Tue Apr 20 15:24:58 1999 @@ -158,10 +158,13 @@ # To use CGI scripts: #AddHandler cgi-script .cgi +AddType application/x-httpd-cgi .cgi +AddType application/x-httpd-cgi .pl # To use server-parsed HTML files -AddType text/html .shtml -AddHandler server-parsed .shtml +#AddType text/html .shtml +AddType text/x-server-parsed-html .shtml +#AddHandler server-parsed .shtml # To use PHP AddType application/x-httpd-php .phtml
AddType 指定した拡張子にファイルの種類を割り当てます。
エラーログ | [/var/log/httpd/error_log] |
再起動 | kill -HUP (PID) |