CentOS under preloaded dependencies, specific to their corresponding add general conditions below enough
Yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel-y
Copy PHP configuration file and FPM profile FPM default port is 9000 Nginx proxy php fastcgi module via this port
CP Php.ini-production/usr/local/php/etc/php.ini
Cp/usr/local/php/etc/php-fpm.conf.default/usr/local/php-5.5.0/etc/php-fpm.conf
Finally, add the following section to the server section under Nginx.conf to connect PHP fast CGI
Location ~. *\. (PHP)? $
{
Expires-1s;
Try_files $uri = 404;
Fastcgi_split_path_info ^ (. +\.php) (/.+) $;
Include Fastcgi_params;
Fastcgi_param path_info $fastcgi _path_info;
Fastcgi_index index.php;
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Fastcgi_pass 127.0.0.1:9000;
}
Test syntax is correct
Nginx-t
Start PHP-FPM after starting in the Sbin directory of the PHP installation path
Ps-ef| grep fpm can view information about the PHP-FPM
Start Nginx, at which point Nginx is already connected to the FASTCGI service provided by PHP-FPM.
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.