In the ubuntu server environment, nginx is installed.
In nginx.conf, the default value of the "user" node is "www-data". That is, owned by the www-data user.
The html file of my website is under another user nguser, and the directory is /home/nguser/website
Now I changed the "root" in nginx.conf to /home/nguser/website, and a 404 error occurred while browsing.
Someone told me that this is a permissions issue, saying that the www-data user cannot access the content of the nguser user.
I am a beginner in linux and nginx. I don’t know how to solve this problem. Please give me an answer!
chmod -R 777 /home/nguser/website