Thursday, July 31, 2014

[DevOps][Nginx] fastcgi_pass Problems

If you are getting error about fastcgi_pass option like this:
2014/07/31 08:08:39 [error] 3536#0: *6 connect() failed (111: Connection refused) while connecting to upstream, client: 95.95.95.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"
or this:
2014/07/31 08:25:07 [crit] 3644#0: *23 connect() to unix:/tmp/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 95.95.95.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php5-fpm.sock:", host: "localhost"
You have probably setted wrong or passive TCP or socket address. You can learn PHP's TCP or socket addsress from /etc/php5/fpm/pool.d/www.conf file. Check lines that starts with these:
listen = 127.0.0.1:9000 ;listen = /tmp/php5-fpm.sock
Destroy ; char from starting, and have fun! Don't forget to restart your PHP or your another service -- like this $ service php5-fpm restart!

No comments:

Post a Comment