Hi Zach,
My current configuration of name based vhost file is restricted to one
file (instead of multiples, like yours).
You could put al your vhosts in one file, e.g.:
#cat /etc/apache2/sites-available/default
NameVirtualHost *:80
<VirtualHost *:80>
ServerAlias bach.jesujuva.org
DocumentRoot /var/www/bach
</VirtualHost>
<VirtualHost *:80>
ServerAlias darcs.jesujuva.org
DocumentRoot /var/www/darcs
ErrorLog /var/log/apache2/error.log
TransferLog /var/log/apache2/access.log
</VirtualHost>
<VirtualHost *:80>
ServerAlias netrek.jesujuva.org
DocumentRoot /var/www/netrek
ErrorLog /var/log/apache2/error.log
TransferLog /var/log/apache2/access.log
</VirtualHost>
<VirtualHost *:80>
ServerAlias wiki.jesujuva.org
DocumentRoot /var/lib/mediawiki1.7
ErrorLog /var/log/apache2/error.log
TransferLog /var/log/apache2/access.log
</VirtualHost>
<VirtualHost *:80>
ServerAlias blog.jesujuva.org
DocumentRoot /var/www/wordpress
ErrorLog /var/log/apache2/error.log
TransferLog /var/log/apache2/access.log
</VirtualHost>
See if that works out for you.
On Fri, 13 Feb 2009, Zach Uram wrote:
Hoi Dennis,
I followed your suggestion and added that NameVirtualHost statement to
each of my 4 vhost files in /etc/apache2/sites-available and now I get
many warnings:
debian:/etc/apache2/sites-available# /etc/init.d/apache2 restart
Restarting web server: apache2[Thu Feb 12 18:33:33 2009] [warn]
NameVirtualHost *:80 has no VirtualHosts
[Thu Feb 12 18:33:33 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Feb 12 18:33:33 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Feb 12 18:33:33 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Feb 12 18:33:33 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting [Thu Feb 12 18:33:35 2009] [warn] NameVirtualHost *:80
has no VirtualHosts
[Thu Feb 12 18:33:35 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Feb 12 18:33:35 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Feb 12 18:33:35 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Thu Feb 12 18:33:35 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
Without adding that NameVirtualHost all my vhosts work fine the only
problem is when i enter http://www.jesujuva.org or http://jesujuva.org
it will serve /var/www/bach/index.html instead of /var/www/index.html
so how can I fix this?
Here are my vhost files:
<snip>
--
M.D. Kramer
Fingerprint: 7A29 D2CD AFC0 6871 EA6E 0D0E 2DAF EE6B 9926 5743
"When you have eliminated the impossible, whatever remains, however improbable, must
be the truth"
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org