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 <VirtualHost *:80> ServerName timely.creatik.nl DocumentRoot /home/develop/timely </VirtualHost>
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
What do you have in <code>/etc/apache2/sites-enabled/</code>?
Yup did that too, still a no-go on the permission or the vhosts. <br> <br>DNS is also set up properly (even added a specific cname on top of the wildcard to make sure the subdomain would resolve properly).
Does apache have access to read <code>/home/develop/timely</code> <br> <br>Run these commands: <br><pre>sudo chgrp -R www-data /home/develop/timely <br>sudo chmod -R g+w /home/develop/timely</pre>
Sorry 'bout that, here’s the pastebin version: http://pastebin.com/Txjiaej3 <br> <br>Anyway I tried reloading, restarting none of it works. <br> <br>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.
Did you try restarting apache? <br> <br><pre>sudo service apache2 restart</pre> <br> <br>Please pastebin your virtualhost configs.