apacheでのSSI(server side include)とCGI (2000.10.12)
普通にdpkgでapacheをinstall。
/etc/apacheにあるaccess.confのや
のOptionsにIncludesとExecCGIを追加。
全体の設定を変える場合はsrm.confの
AddHandler cgi-script .cgi
と
AddType text/html .shtml
AddHandler server-parsed .shtml
のコメントを削除。hoge.htmlでもSSIを使う場合は.shtmlでなく.htmlに
しても良い。(ただし遅くなる?)
全体の設定は変えずUserがそれぞれ設定する場合は.htaccessにAdd...を書く。
httpd.confの
LoadModule cgi_module
LoadModule includes_module
のコメントをはずす。
なぜか自分でinstallしたserverだと日本語が化けてしまう…
ということでいろいろやった結果srm.confを以下のように変更することでできた。
LanguagePriority ja
AddDefaultCharset on
AddDefaultCharsetName iso-2022-jp