403 Forbidden in nginx on Centos 7

November 29, 2017 6.9k views
Nginx WordPress CentOS

Having issues when I moved files from my old host to a Centos 7 droplet where when you visit those directories in a browser return a 403: Forbidden response.

The nginx error log shows the same thing, where permission is denied.

I have done the following to attempt to fix the nginx permissions:

cd /var/www
sudo chown -R nginx:nginx /var/www
find . -type d -exec chmod 755 {} \;  # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \;  # Change file permissions rw-r--r--

The resulting ls -lhA command shows nginx as the owner.

Nevertheless, a 403 persists.

I've sudo systemctl restart nginx php-fpm several times as well.

Configuration file contents

I believe those are all the config files. If someone needs to look at something else I can provide it

Be the first one to answer this question.