After updating my website on webfaction nginx kept saying permission denied and when I tried to view my site I got a 502 Bad Gateway error page.

To restart nginx I use to call:

  ~/webapps/passenger/bin/restart

I had to change this to:

~/webapps/passenger/nginx/sbin/nginx -p ~/webapps/passenger/nginx/ -s stop  
~/webapps/passenger/nginx/sbin/nginx -p ~/webapps/passenger/nginx/