http://httpd.apache.org/download.cgiから apache2.2.22 src をダウンロードしてインストールしました。インストールは正常に機能します。しかし、仮想ホストを追加しようとすると問題が発生します。2 つの仮想ホストを追加しました 1. localhost 2. someother.localhost どちらも異なるドキュメント ルートを指していますが、最初の仮想ホストのドキュメント ルートに解決されます。
これが私のvhostファイルです。
NameVirtualHost *:80
<VirtualHost *:80> ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "/webserver/htdocs" ServerName localhost ErrorLog "logs/localhost-error_log" CustomLog "logs/localhost-access_log" common </VirtualHost> <Directory /home/sourabhn/somepath> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> <VirtualHost *:80> ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "/home/sourabhn/somepath" ServerName someother.localhost ErrorLog "logs/someother-localhost-error_log" CustomLog "logs/someother-localhost-access_log" common </VirtualHost>
hostsファイルに適切なエントリを作成しました。Ubuntu 11.10 マシンを実行しています。貴重なご意見をお聞かせください