[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: serving wrong index.html ?



Zach Uram wrote:
Hi,

I added name based vhosts to my Apache2 install on Debian lenny, but
now when I go to my site:
http://www.jesujuva.org or http://jesujuva.org instead of serving up
/var/www/index.html it serves /var/www/bach/index.html ! Here are my
files:

debian:/etc/apache2# ls sites-available/
bach  darcs  netrek  wiki  wp
debian:/etc/apache2# ls sites-enabled/
bach  darcs  netrek  wiki  wp

debian:/etc/apache2# cat sites-enabled/bach
<VirtualHost *:80>
      ServerName bach.jesujuva.org
      DocumentRoot /var/www/bach
</VirtualHost>

Zach


Apache is doing exactly what you are asking it to do. You are pointing to /var/www/bach as the DocumentRoot for jesujuva.org. So, of course it is going to be serving /var/www/back/index.html. If you want to serve a different set of files you have to point Apache to that set of files. For example, if the index.html file for jesujuva.org is inside the /var/www/jesujuva directory you would use that directory as your DocumentRoot. If the DocumentRoot for jesujuva.org is in /var/www then that is where you would point Apache. I agree with one of the other people who replied here. It's much easier to put the configuration for all your sites in a single file.
Reply to: