In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the cgi process in php does not have a solution, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
There are no solutions for the php cgi process: 1, open the corresponding configuration file; 2, keep the listen in php-fpm.conf consistent with the conf listen in nginx.conf or vhost.
This article operating environment: linux5.9.8 system, PHP5.6,Dell G3 computer.
Is there a php cgi process? PHP successfully started php-fpm, but the php-cgi process could not find 502 getaway?
Generally speaking, after we have just installed the lnmp environment and changed the fastcgi_pass unix:/tmp/php-cgi.sock entry in nginx to fastcgi_pass 127.0.0.1 fastcgi_pass 9000, the web access prompts 502 error pages. You can't find the php-cgi process using netstat-tlunp.
Solution:
1. LNMP uses unix sockets by default, and the parameter fastcgi_pass in the virtual host configuration file is unix:/tmp/php-cgi.sock.
Need to make sure the settings in / usr/local/php/etc/php-fpm.conf
Php version 5.3 and above is listen = / tmp/php-cgi.sock
At the same time, the fastcgi_pass unix:/tmp/php-cgi.sock; inconsistency in the virtual host configuration under / usr/local/nginx/conf/nginx.conf and / usr/local/nginx/conf/vhost/ is bound to be 502.
two。 Sometimes it may be 502in unix socket mode.
You can try to change it to tcp/ip.
Replace php version 5.3 and above listen = / tmp/php-cgi.sock with listen = 127.0.0.1 tmp/php-cgi.sock. Replace fastcgi_pass unix:/tmp/php-cgi.sock; with fastcgi_pass 127.0.0.1 tmp/php-cgi.sock in the configuration file and virtual host configuration file. Try rebooting later.
Summary:
/ usr/local/php/etc/php-fpm.conf listen should be consistent with conf listen in nginx.conf or vhost
To be consistent with nginx configuration
These are all the contents of this article entitled "Solutions not available to the cgi process in php". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.