aws/opsworks-cookbooks — pull request #10 by joeyAghion (2013-03-03 21:27:05+00:00)
Title: Allow nginx to access to the unicorn socket

I have exactly the issue described here:

https://forums.aws.amazon.com/thread.jspa?threadID=118236

Nginx can't write to the unicorn socket because of the shared/sockets directory's permissions.

Example error message:

_...connect() to unix:/srv/www/myapp/shared/sockets/unicorn.sock failed (13: Permission denied) while connecting to upstream, client: 10.158.40.157, server: myapp.com, request: "OPTIONS / HTTP/1.0", upstream: "http://unix:/srv/www/myapp/shared/sockets/unicorn.sock:/"_

This proposed change expands the permissions on the sockets directory. Thanks for considering it!