Apache vhost not working

Posted September 12, 2013 6k views
Hi, I'm trying to set up a vhost in apache but everytime it uses the default directory /var/www instead of the one I've inserted. Even when disabling all the default vhost configs it still goes to the /var/www dir! Any idea what could cause this? Ssytem information: Image: Ubuntu 12.04 LAMP Updated PHP to 5.5 and Apache to 2.4 No other modifications Vhost: NameVirtualHost *:80 ServerName DocumentRoot /home/develop/timely

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers
Did you try restarting apache?

sudo service apache2 restart

Please pastebin your virtualhost configs.
Sorry 'bout that, here's the pastebin version:

Anyway I tried reloading, restarting none of it works.

When I enable the default (000-default) config and change the documentroot to the folder I want I get a "Permission denied" error which probably is correct but the strange thing is that the other vhosts go to the same directory as the default config.
Does apache have access to read /home/develop/timely

Run these commands:
sudo chgrp -R www-data /home/develop/timely

sudo chmod -R g+w /home/develop/timely
Yup did that too, still a no-go on the permission or the vhosts.

DNS is also set up properly (even added a specific cname on top of the wildcard to make sure the subdomain would resolve properly).
What do you have in /etc/apache2/sites-enabled/?