Nginx needs "execute" access to the directories where the files you want to serve live, and also to every parent directory, all the way to the top.

So, if you want to serve /home/me/my_site/index.html, and the Nginx's host configuration points to /home/me/my_site, make sure the www-data user (or whichever user Nginx is using) has this permission on /home, /home/me, and /home/me/my_site.

$ chmod +x /home
$ chmod +x /home/me
$ chmod +x /home/my_site
Final thoughts

I just spent hours on this! Credit for helping me figure it out goes to this excellent person.

Mastodon Mastodon