Sometimes, when nginx reads the local directory, it will receive a 403 error and a permission error.
First, let's take a look at nginx user management. When nginx is started with a Linux service script, it is started through start-stop-domain and runs the daemon process with root permission.
Then, the daemon process reads the user configuration option in the/etc/nginx. conf file. The default user = nginx
That is, start Worker Process with nginx users. The error 403 is because the nginx user does not have the permission to access the user directory for my current development,/home/Dean/work/resources.
The solution is to replace user = nginx with root and restart nginx.
You have also tried other methods, such as setting 777 permissions for the/home/Dean/work/Resources Directory, or adding nginx users to the root group.
So when developing, use user = root configuration. In the product environment, the resouces directory can be placed in the nginx user directory, so the problem is not serious.