http.confを編集してバーチャルホストの設定ファイル(httpd-vhosts.conf)を読み込むように設定する。
httpd-vhosts.conf
# Virtual hosts
Include conf.d/httpd-vhosts.conf
※redhat系でない場合は、/etc/httpd/extra/httpd-vhosts.confに書くようだ。
httpd-vhosts.conf
# www.hogehoge.org
<VirtualHost *:80>
DocumentRoot /var/www/vhosts/hogehoge
ServerName www.hogehoge.org
ServerAlias hogehoge.org
ErrorLog logs/hogehoge.org-error_log
CustomLog logs/hogehoge.org-access_log combined
</VirtualHost>
http://www.hogehoge.org にアクセスしたときに /var/www/vhosts/hogehoge/ ディレクトリのファイルを表示する。エイリアスとして www なしの http://hogehoge.org/ でも同じ設定を使うようになっています。また、ログも分けて出力する。
バーチャルホストが多数ある場合
バーチャルホストの設定が多数あるときは、それぞれのサイト毎にファイルを分けた方が管理し易いと思います。その場合は、下記のように設定すると良いかも。
httpd-vhosts.conf
# Virtual hosts
Include conf.d/vhosts/*.conf
上記のように、conf.d/vhosts/*.conf を読み込むように設定しドメイン事に hogehoge.org.conf や hogehoge2.org.conf などのファイルを作っていきます。
hogehoge.org.conf
# www.hogehoge2.org
<VirtualHost *:80>
DocumentRoot /var/www/vhosts/hogehoge2
ServerName hogehoge2.net
ServerAlias www.hogehoge2.net
AddDefaultCharset euc-jp
<Directory "/var/www/vhosts/hogehoge2">
Options Includes ExecCGI FollowSymLinks MultiViews
php_value mbstring.language Japanese
php_value mbstring.internal_encoding EUC-JP
php_value mbstring.http_input auto
php_value mbstring.http_output EUC-JP
</Directory>
</VirtualHost>
上記は、www.hogehoge2.org をEUC-JPで稼動させ,PHPの内部コード(internal_encoding)と出力(http_output)もEUC-JPに設定している。
しかし、再インストールは面倒ですなぁ〜 (/_;)
※ディスクが故障し交換のため、すべて再インストールになった哀れな者