Apache2 + PHP

$ aptitude install apache2
$ aptitude install php5

設定ファイルが特殊なことに注意。http://golgotha.xrea.jp/archives/2005/12/debian_sarge_ap.html によると、

apache2.conf →基本設定が書いてある
httpd.conf  →本来なら、ここに色々書いてあるがほぼ空。
ports.conf  →apache2が使うポートが書いてある。
sites-availables/default →実際のサイト定義。
mods-available/*.conf  →modの設定群

となっている。デフォルトの DocumentRoot は /var/www で sites-availables/default に書いてある。これを /home に変更して、さらにユーザの公開ディレクトリを /home/*/html にする。

        DocumentRoot /home
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /home/*/html>
                Options Indexes FollowSymLinks MultiViews

PHP の動作確認をするために、以下のスクリプトを /home/*/html 以下に保存してブラウザから表示する。PHP のバージョン情報が表示されたらインストールは成功。

<?php
phpinfo();
?>