This was originally a draft on the Annexe, my Tumblr side blog.

Getting a 502 bad gateway:

Check permissions, location of your socket file

Still getting 502. Uncomment the following lines in php-fpm.conf:

listen.owner = www
listen.group = www
listen.mode = 0660

Boom.