I am setting up an apache2 server on my server. I wanted to use another directory then /var/www. I created the directory /web
added my user to the www-data group
changed the owner/group and the permission:
chown -R root:www-data /web
chmod -R 755 /web
and then I created a new virtualhost with the right directory root enabled the site disabled the default one. Restarted the server.
But my server says: Forbidden you don't have permission.... I don't get why, I have already tried all possible tutorials of diverse forums and websites, but I can't get it working
My virtualhost config:
<VirtualHost *:80>
ServerName example.com
ServerAdmin webmaster@localhost
DocumentRoot /web/test
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>