xxxxxxxxxx
Change the www-data user in the nginx.conf file to root, in case you are on root user.
xxxxxxxxxx
# in rails (unicorn + nginx), change the permission as below for the user
sudo chmod og+x /home/<username>
xxxxxxxxxx
cd /home/user/domains/domain.com/public_html # Goto the project path basically
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
xxxxxxxxxx
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user your_user_name;
# same other config