i keep getting error in nginx.error.log:
2016/06/06 20:14:02 [error] 907#0: *1 connect() unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock failed (111: connection refused) while connecting upstream, client: 50.100.162.19, server: , request: "get / http/1.1", upstream: "http://unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock:/", host: "appname.com" (here manually added newlines convenience) 2016/06/06 20:14:02 [error] 907#0: *1 connect() unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock failed (111: connection refused) while connecting upstream, client: 50.100.162.19, server: , request: "get / http/1.1", upstream: "http://unix:///home/user/apps/appname/shared/tmp/sockets/appname- puma.sock:/", host: "appname.com"
this nginx.conf:
upstream puma { server unix:///home/user/apps/appname/shared/tmp/sockets/appname-puma.sock; } server { listen 80 default_server deferred; # server_name example.com; root /home/user/apps/appname/current/public; access_log /home/user/apps/appname/current/log/nginx.access.log; error_log /home/user/apps/appname/current/log/nginx.error.log info; location ^~ /assets/ { gzip_static on; expires max; add_header cache-control public; } try_files $uri/index.html $uri @puma; location @puma { proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $http_host; proxy_redirect off; proxy_pass http://puma; } error_page 500 502 503 504 /500.html; client_max_body_size 10m; keepalive_timeout 10; }
what doing wrong? followed digital ocean's tutorial set capistrano, nginx , puma.
so solution restart puma.
cap production deploy:restart
every time reboot server, need restart puma well.