0

I've added one virtual host to sites-available. It was showing Index Of... a while ago, then I installed mysql, don't know if it's the reason but after that there was 404, then I changed Directoryto /var/www/html/ and is now showing 403.

I'ver tried chown -R www-data:www-data /var/www with no avail.
Also changed DocumentRoot in 000-defaut.conf to /var/www/html/. There're never any errors in error.log.

It's a vps and i'm accessing it via ssh

3

1 Answer 1

0

We eventually found that is a misconfiguration between 00-default and mysite.com.

I guess that request are serverd by mysite.com VirtualHost that have not permission to access /var/www/html.

If you need both VirtualHost working, Apache need to recognize both either by name or by ip.

You should add ServerName directive in 00-default and add both name in /etc/hosts as described in How to access a website under Ubuntu

Also don't forget that 404 error means "not found", when you change DocumentRoot, you should move file to the new directory too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.