nginx 502 bad gateway

I executed my localhost and the page displayed the 502 bad gateway message. This helped me: Edit /etc/php5/fpm/pool.d/www.conf Change listen = /var/run/php5-fpm.sock to listen = 127.0.0.1:9000 Ensure the location is set properly in nginx.conf. Run sudo service php5-fpm restart Maybe it will help you. Source from: http://wildlyinaccurate.com/solving-502-bad-gateway-with-nginx-php-fpm

How to debug “FastCGI sent in stderr: Primary script unknown while reading response header from upstream” and find the actual error message?

To answer your question: in php-fpm.d/www.conf file: set the access.log entry: access.log = /var/log/$pool.access.log restart php-fpm service. try to access your page cat /var/log/www.access.log, you will see access logs like: – – 10/Nov/2016:19:02:11 +0000 “GET /app.php” 404 – – 10/Nov/2016:19:02:37 +0000 “GET /app.php” 404 To resolve “Primary script unknown” problem: if you see “GET /” … Read more

Differences and uses between WSGI, CGI, FastCGI, and mod_python in regards to Python?

A part answer to your question, including scgi. What’s the difference between scgi and wsgi? Is there a speed difference between WSGI and FCGI? How Python web frameworks, WSGI and CGI fit together CGI vs FCGI Lazy and not writing it on my own. From the wikipedia: http://en.wikipedia.org/wiki/FastCGI Instead of creating a new process for … Read more