Sunday, May 6, 2012

Nginx 403 error on all files

Recently I moved my personal website to my VPS, from a hosting provider. Everything was fine but Nginx just wouldn't serve static js and css files.

Saw a couple of posts about this like, http://nicholasorr.com/blog/2008/07/22/nginx-engine-x-what-a-pain-in-the-bum/. Checking the logs showed the same permission denied error, but the individual files were readable by all users.

However, Stackoverflow saved the day!

The directories needed execute permission! and it didn't have it.... so another unnecessary post, nevertheless I've already typed the whole thing out, so I might as well let it stay.