I have used name based vhosts for a while and never had any problems
with them. But now I have encountered a problem.
I setup a vhost called qubit.
Here is /etc/apache2/sites-available/qubit:
<VirtualHost *:80>
ServerAdmin root@oggthebase.org
ServerName qubit.oggthebase.org
ServerAlias qubit.oggthebase.org
DocumentRoot /var/www/qubit/
ErrorLog /var/www/qubit/logs/error.log
CustomLog /var/www/qubit/logs/access.log combined
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from localhost
</Location>
</VirtualHost>
Now the problem is when I load the vhost: http://qubit.oggthebase.org
it instead loads /var/www/index.html and not /var/www/qubit/index.html
I think the problem is that /var/www/qubit is not owned by root? I
want a user to have that as their website so I did this:
adduser joe www-data
chown -R www-data:www-data /var/www/qubit
chmod -R g+rw /var/www/qubit
Anyway to get this working correctly?