403 Forbidden after changing DocumentRoot directory

Print

Q. I am getting a Forbidden 403 error after I've changed the DocumentRoot in Apache for my domain. What do I do?

A. The solution is quite simple:

Edit the apache2.conf (/etc/apache2/apache2.conf) and add the new directory to default security model:

<Directory /your/new/dir>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

Restart apache and you're done

Source: https://www.altconsulting.com/kb/linux/136-403-forbidden-after-changing-documentroot-directory

 

Web Servers
Comments (1)
Restart apache and you're done
1 Saturday, 21 March 2020 19:10
Apache
This solution does not work. This is not serious...
yvComment v.1.24.0