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

NestedWeb
  • 103

1 Answers1

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.

Lety
  • 6,039
  • 2
  • 29
  • 37