What version of PHP is used by Nginx depends on PHP-FPM which PHP version

Source: Internet
Author: User
Tags fpm

Nignx Specifies which PHP to use depends on which PHP php-fpm is

Reason

Because Nginx is the default listener is the 127.0.0.1:9000 port, the default 9000 port has been occupied by the previous PHP

1. set different port numbers for different php-fpm, with address port number as parameter at Fastcgi_pass
2.fastcgi_pass directly with the socket connection, just change the path

Solutions 1

Because Nginx is the default listener is 127.0.0.1:9000 port, the default 9000 port has been occupied by the previous PHP , please follow the following steps to configure:
1.cd/usr/local/php7/etc/php-fpm.d/www.conf, find listen 127.0.0.1:9000, and then change 9000 to custom, I myself modified to 9001, And then save the exit
2.cd/usr/local/nginx/conf/nginx.conf, find Fastcgi_pass this line, modified as: Fastcgi_pass 127.0.0.1:9001;
3. turn off the low version of PHP-FPM/ETC/INIT.D/PHP-FPM stop
4. turn on PHP7 php-fpm/etc/init.d/php7-fpm start
5. Restart nginx service nginx Restart

I'm done here and I hope to help you! With the php7 phpinfo interface, let's get a glimpse

Solutions 2

Close the previous PHP-FPM

and open the PHP-FPM now.

Possible Error resolution solution (

CP Php-fpm.conf.default php-fpm.conf

CP Www.conf.default www.conf

What version of PHP is used by Nginx depends on PHP-FPM which PHP version

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.