Even though permissions and file ownership were set correctly - directory ownership was set with
sudo chown public_html www-data:www-data
there were 403 errors for all pages of one of our websites running on Apache.
The reason for the 403 errors in this case was that the Directory directive was being set for the wrong directory. For wordpress, for example, we would need
<Directory /our/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
No comments:
Post a Comment