Some websites that run on Nginx sometimes appear "502 Bad Gateway" errors, even when they occur frequently. The following is a small compilation of some of the Nginx 502 error troubleshooting methods, for reference:The reason for Nginx 502 error is
The security practice of PHP, which must be known by system administrators, is an open source server scripting language and widely used. The Apacheweb server provides the convenience of accessing files and content through HTTP or HTTPS. Improper
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
Php-FPM configuration in nginx tutorialNginx can directly call FPM to drive php and then discard apache. Let's not talk about the reason.First download the php5.4 installation package.According to others The code is as follows:Copy code .
First, we introduce some concepts to understand CGI and FastCGI
Cgi
The Universal Gateway Interface (Common Gateway interface/cgi) is an important Internet technology that allows a client to request data from a Web browser to a program executing
To agree on several directories
/usr/local/php/sbin/php-fpm
/usr/local/php/etc/php-fpm.conf
/usr/local/php/etc/php.ini
First, the PHP-FPM start parameter
#测试php-FPM Configuration
/usr/local/php/sbin/php-fpm-t
/usr/local/php/sbin/php-fpm-c/usr/
To agree on several directories
/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.iniFirst, the PHP-FPM start parameter
Copy Code code as follows:
#测试php-FPM Configuration
CGICGI is short for "CommonGatewayInterface". It is a tool for the HTTP server to "talk" with programs on your or other machines, the program must run on the network server. CGI can be written in any language as long as it has standard input, output,
CGICGI is short for "CommonGatewayInterface". It is a tool for the HTTP server to "talk" with programs on your or other machines, the program must run on the network server. CGI can be written in any language as long as it has standard input, output,
499 Error ResolutionWhat is the 499 error? Let's look at the definition of Nginx in the source code:Ngx_string (Ngx_http_error_495_page),/*495, HTTPS certificate error*/ngx_string (ngx_http_error_496_page),/*496, HTTPS no certificate*/ngx_string
Just to the company configuration Ununtu PHP Environment, the first use of Php+apache, installation is very simple, do not need any configuration. On the internet to see Nginx good, found a lot of sites are used Nginx. So, the Apache removed,
Php security configuration records and common errors (Summary), common php errors
After the php environment is deployed, some security settings are made. In addition to being familiar with various php vulnerabilities, you can also configure php. ini
generallyThe php-cgi process is not enough, PHP execution time is long (MySQL slow), or the php-cgi process is dead, there will be 502 errors;The Nginx 504 Gateway time-out is related to the nginx.conf setting;1.502 and php-fpm.confResource problems
Recently, server downtime occurs frequently. When I get off work, G crashes and 502 Bad Gateway Nginx reminds me of the previous 504 Gateway Time-out, the two should be in a certain relationship. Nginx 504 Gateway Time-out means that the requested
The full name of CGI is "CommonGatewayInterface". an HTTP server is a tool used to "talk" with programs on your or other machines. programs must run on network servers.
Full range of PHP Video Tutorial: elaborate PHP-http://www.xishuophp.com/
In
After the php environment is deployed, some security settings are made. in addition to being familiar with various php vulnerabilities, you can also configure php. ini to reinforce the runtime environment of PHP, and PHP has been officially modified
This article mainly introduces the PHP security Configuration records and common error carding detailed, interested in the friend's reference, I hope to be helpful to everyone.
Usually after the deployment of the PHP environment will be some
Specify Directories
/Usr/local/php/sbin/php-fpm/Usr/local/php/etc/php-fpm.conf/Usr/local/php/etc/php. iniI. startup parameters of php-fpmCopy codeThe Code is as follows:# Test the configuration of
PHP-FPM start parameters and important configuration of the detailed, this needless to say, do PHP development students need to use.Contract several directories/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.iniOne,
First of all, the structure of our website, because the current site traffic is not very large, but due to the recent company website to promote, so the site from a single switch into the front-end with Nginx do load balancing, drive two Web servers,
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.