Rotten mud: nginx, php-fpm, mysql user permission parsing, nginxphp-fpm
This article is first published in the dark world.
I learned how to build a wordpress blog under nginx a few days ago. In the article "dirty mud: Using nginx to build a WordPress blog using a virtual host", we specifically mention the user who runs the program.
In this article, we will explain the configuration of nginx, php-
PHP-FPM for performance optimization and PHP-FPM performance optimization
Brief introduction:
PHP-FPM is a PHP FastCGI manager, General Nginx above the PHP program will throw PHP program to PHP-FPM to parse. All right, that's it!
PHP 5.4 began to integrate the PHP-FPM, that
PHP-FPM configuration and usage summary, php-fpm configuration Summary
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
PHP-FPM configuration and use summary:
PHP-FPM is a PHP FastCGI manager, which is actually a PHP source code pa
Recently, a colleague has a guardianship requirement for the PHP-FPM process, i.e. if the master process of PHP-FPM quits unexpectedly (possibly crash, it could be a false kill), then the master process is expected to be pulled automatically to avoid interruption of service.
We know that supervisor is a very powerful process monitoring (monitor Control) tool that can theoretically implement the PHP-
Php-fpm process shutdown and restart script details, php-fpm details. Php-fpm process shutdown and restart script details, php-fpm details first to understand what is php-fpmPHP-FPM is a PHPFastCGI manager, is only used for PHP. PHP-FPM
PHP-FPM to achieve performance optimization, php-fpm Performance Optimization
Introduction:
PHP-FPM is a PHP FastCGI manager, the general Nginx above the run PHP program will be PHP program thrown to the PHP-FPM for parsing. Okay, that's it!
PHP 5.4 began to integrate the PHP-FPM
The recent 502 error of Nginx Gap, how to implement automatic restart PHP-FPM?
Think of the solution
1. Execute shell script with crontab timer, reboot after error (timed execution every 5 seconds)2. Using the Nohup,shell script background execution
Sample Script
#!/bin/bash while : do URL="http://192.168.1.30" RESULT=`curl -m 10 -I -s $URL | grep "HTTP/1.1 502"` if [ -n "$RESULT" ]; then /etc/init.d/php-
Php-fpm process shutdown and restart script details, php-fpm details
Let's first understand what is php-fpm
The PHP-FPM is a PHP FastCGI manager and is only for PHP.
PHP-FPM is actually a patch of PHP source code, designed to integrate FastCGI process management into the PHP
Nginx communicates with php-fpm using unix socket or TCP, and its configuration, nginxphp-fpm
Preface
Nginx and fastcgi can communicate in either TCP or unix socke. The two methods have their own advantages and disadvantages. Here we first provide two configuration methods, and then summarize the performance and security.
TCP is to use TCP port to connect 127.0.0.1: 9000Socket is connected to socket/dev/shm
The relationship between FastCgi and PHP-fpm, fastcgiphp-fpm
Web server (such as nginx) is only the content distributor. For example, if the request/index.htmlThe web server will find the file in the file system and send it to the browser. static data is distributed here. Okay, if the request is/index.phpAccording to the configuration file, nginx knows that this is not a static file and needs to be handled
Analysis of php-fpm static and dynamic execution methods, analysis of php-fpm
This article describes the comparison between static and dynamic execution methods of php-fpm. We will share this with you for your reference. The details are as follows:
Some time ago, when I configured php-fpm, I accidentally found that the
PHP-FPM process pool probing, php-fpm pool probing
PHP supports multi-process rather than multi-thread; PHP-FPM runs multiple sub-processes in the process pool to process all connection requests concurrently. View the PHP-FPM process pool (pm. start_servers = 2) status through ps as follows:
root@d856fd02d2fe:~# ps aux
Difference between CGI, FastCGI, and php-fpm, cgifastcgiphp-fpmRefer to the online description to organize the online description:First, what does CGI do? CGI is used to ensure that the data transmitted by the web server is in the standard format, so that the compilation of CGI programs is convenient.Web server (such as nginx) is only the content distributor. For example, if you request/index.html, the web server will find the file in the file system
Relationship between nginx and php-fpm, nginxphp-fpm
People can perceive it, but the server cannot perceive it. We call it forward to the proxy server.
There is a server load proxy server in the center of Baidu for reverse proxy access.
This is not perceptible to people, but it is perceptible to servers. We call it a reverse proxy server.
Nginx is a high-performance http and reverse proxy server and an IMA
Download wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
2. Yum-y Install Nginx3. Service Nginx RestartSee WELCOME to NGINX instructions for installation success!4.yum-y Install PHP-FPM5. Let Nginx support PHP-FPMFind /etc/nginx/conf.d/default.conf, Open Edit It>vi/etc/nginx/conf.d/default.confRemove the comments from the following section to supportPHPScript:Location ~ \.php$ {root HTML;Fastcgi_pass 127.0.0.1:9000;Fastcgi_index index.php;Fast
Use the php-fpm status page to observe the current php-fpm status.For php-fpm parameter settings, in many cases, there are several built-in parameters, such as pm. max_children, pm. start_servers and so on. In fact, these parameters often depend on the current number of connections. In most cases, it is difficult to determine whether the current number of connect
When php-fpm is generating a page, will php-fpm exit after the browser is refreshed? I haven't written a blog for a long time, because there is nothing to write.
The reason for this question is that I read an article titled "PHP upgrade", which leads to an analysis of the problem of high system load. After reading it, some of the text triggers my idea and I want to verify it.
Solution: Use tcpdump to cap
PHP-FPM High Load Tips (php-fpm on highload tips)
Original address: http://hi.baidu.com/pibuchou/blog/item/7cbccff0a3b77dc60b46e024.html
?
PHP-CGI (FASTCGI) leading to Nginx 502 Bad Gateway
Nginx frequency Explosion 502 Bad Gateway error, read the online tutorial, still not completely solved.At present I summarize the way to solve 502 bad Gateway:1. Depending on the performance of the server, increase th
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.