Scripting code
The code is as follows
Copy Code
if [-e/var/lock/subsys/502]ThenKillall-9 Curl 2>/dev/nullKillall-9 PHP-FPM 2>/dev/nullKillall-9 php-cgi 2>/dev/nullService PHP-FPM Start >/dev/nullecho "[' Date +
Original post: http://hily.me/blog/2010/02/nginx-php-fpm-resouce-temporarily-unavailable/
Today on the test server on the Nginx + PHP-FPM environment, the results found that the PHP page frequently 502 bad Gateway error.Nginx version:
This tutorial is primarily configured with the Windows 2008 SP2 32bit standard to configure PHP 7.0rc2+nginx 1.9.4+mysql 5.6.26, and to turn on HTTPS access.
First, preparatory work
1, Nginx+php+mysql and other downloads and decompression: Baidu
1. The WIN+NGINX+PHP+MYSQL Environment constructs
Nginx is a high-performance http and reverse proxy server, as well as a IMAP/POP3/SMTP proxy server, developed by the Russian rambler.ru site, Nginx is known for its stable performance and low
For LNMP installations, each operational dimension may have been hundreds of times. Here's what I think is the simplest and most efficient installation scenario.
1. Upgrade Yum to the latest version:
The code is as follows
Copy
Pidstringthe location of the PID file. Default is null. Error_logstringthe location of the error log. Default: Installation path #install_prefix#/log/php-Fpm.log.log_levelstringerror level. The available levels are: alert (must be processed
1. nginx+php Installation
Download Nginx, install to the specified directory, such as D:\nginx-1.7.5.
Download PHP, install to the specified directory, such as D:\php. Note: PHP Binaries in the window environment include both
Reference to the original http://www.cnblogs.com/huayangmeng/archive/2011/06/15/2081337.html
1, first need to prepare the application package.
nginx:nginx/windows-1.1.3
Php:php-5.2.16-nts-win32-vc9-x86.zip (Nginx PHP is run in fastcgi mode, so we
Software version:
Nginx:nginx-1.1.7.zip
Php:php-5.3.6-nts-win32-vc9-x86.zip
Mysql:mysql-essential-5.1.57-win32.zip
Convenient package software: Phpsys
First install Mysql, direct decompression installation to the directory, I install here in F:/
Having just seen the word nginx, I am curious about its reading method (engine x), my literal translation is "engine X", the general introduction of the "Chi" Table performance, and "X" most of the appearance is to indicate "Xtras (additional effect)
MAX_CHILDREN=40, each children occupies the average 20m-30m memory, the more children, can accept concurrently the number of concurrent, the general children value is the maximum number of concurrent sites + floating value, this value and then x
First, PHP operating mode in Apache
PHP in the Apache a total of
three ways of working:CGI mode, fastcgi mode, Apache module DLL
The following are compared separately:
1. CGI mode compared to module mode:The difference between the two ways PHP
Before the Windows Server Management, my understanding also stopped in the personal user operating system cognition, this time to build bugfree environment, quite a lot of trouble;Before the installation, I Baidu's Bugfree build mostly uses the
1. Preparing the installation package, etc.(1) nginx-1.10.1.zip, download link for http://nginx.org/en/download.html. I personally chose the stable version.(2) php-5.6.25-nts-win32-vc11-x86.zip or x64.zip download link is
Nginx Errorsupstream Response Cache Error
*2470578 an upstream response are buffered to a temporary file/var/cache/nginx/proxy_temp/6/10/0000010106 while reading up Stream
To fixvim/etc/nginx/nginx.conf# in HTTP part of Nginx.confproxy_
First, lamp combination of basic knowledge Second, WordPress, phpMyAdmin installation LAMPLinuxApache (httpd)MysqlPHP, Python, Perl, Ruby, etc. Combination of A and p:Cgi:common Gateway Interface Universal Gateway Interface, which can be understood
PHP common mode of operation:1.CGI(Universal Gateway Interface/Common Gateway Interface)--apache Server encounters a PHP script that is interpreted by the CGI program and returns an explanation of the results to the Apache server.2.FastCGI(resident
This article mainly describes the fastcgi file read the vulnerability of the Python scan script, the need for friends can refer to the following
Remote use of PHP fastcgi
When it comes to fastcgi, we all know that this is one of the most common
This article provides a detailed analysis of the php-fpm parameters. For more information, see
Ps aux | grep php-fpm | moreView the total number of php-fpm instances
Php-fpm.conf configuration
Pid string
PID file location. the default value is null.
This article provides a detailed analysis of the Nginx502BadGateway error solution. For more information, see Nginx.
Max_children = 40, each children occupies 20 M-30M of memory on average. the more children, the more concurrency can be accepted at
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.