I downloaded apache2.2.22 src from http://httpd.apache.org/download.cgi and made the installation. The installation works fine. But the problem arises when I try adding vhosts. I added 2 virtual hosts 1. localhost 2. someother.localhost Both point to different document roots, but resolve to the doc root of the first virtualhost.
hereis my vhost file,
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>
I have made the appropriate entry in the hosts file. I am running a Ubuntu 11.10 machine. Please get back with your valuable suggestions