phpgroupwareが文字化けするので調べた。
検索すると/etc/apache2/httpd.confを編集せよと言うのが沢山出るが、debianのapache2はhttpd.confは空っぽでした。
/etc/apache2/apache2.confを編集したが、改善しない。
/etc/apache2の中を見ると
-rw-r--r-- 1 root root 2266 Jul 28 2006 README
-rw-r--r-- 1 root root 24175 Mar 27 21:53 apache2.conf
-rw-r--r-- 1 root root 12480 Oct 24 2006 apache2.conf.dpkg-old
drwxr-xr-x 2 root root 88 Dec 21 21:27 conf.d
-rw-r--r-- 1 root root 895 Mar 27 21:58 envvars
-rw-r--r-- 1 root root 268 Oct 24 2006 httpd.conf
-rw-r--r-- 1 root root 12441 Jul 28 2006 magic
drwxr-xr-x 2 root root 2680 Apr 30 22:39 mods-available
drwxr-xr-x 2 root root 672 Apr 15 09:51 mods-enabled
-rw-r--r-- 1 root root 10 Oct 24 2006 ports.conf
drwxr-xr-x 2 root root 72 Apr 15 09:51 sites-available
drwxr-xr-x 2 root root 80 Oct 24 2006 sites-enabled
conf.dというディレクトリが怪しい
-rw-r--r-- 1 root root 22 May 11 20:43 charset
lrwxrwxrwx 1 root root 30 May 11 20:13 phpgroupware.conf -> ../../phpgroupware/apache.conf
中を見ると
AddDefaultCharset ISO-8859-1
となっている。
AddDefaultCharset off
にして、/etc/init.d/apache2 reloadでおしまい。
文字化けは解消しました。
しかし、違う機械ではconf.dの中にcharsetが無いものもあり、その場合には/etc/apache2/apache2.confを編集して
AddDefaultCharset ISO-8859-1をAddDefaultCharset offにすれば良い。
Charsetがどうしてあったりなかったりするのかは、分からないまま。
とりあえず、文字化けは解消できるのでよしとする。