Report this

What is the reason for this report?

Apache vhost not working

Posted on September 12, 2013

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>



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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>

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).

Did you try restarting apache? <br> <br><pre>sudo service apache2 restart</pre> <br> <br>Please pastebin your virtualhost configs.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.