LNMP installing multiple Versions of PHP

Source: Internet
Author: User
Tags fpm

The PHP7 version was installed through LNMP, but was found to be incompatible with the program and needed to be reduced to a version below 7.0.

    1. to find the install.sh file for LNMP, typically under/root/lnmp1.5/install.sh
    2. execute command

      sudo./install.sh mphp

      Waiting for the installation process

    3. installation ends
    4. has multiple versions of PHP

      5. There will be one more/usr/local/nginx/conf under the enable-php5.6.conf
    5. need to modify Nginx configuration, Find include enable-php.conf; modified to include enable-php5.6.conf;
    6. Restart sudo lnmp restart

      8. Disable the original version of PHP

      /ETC/INIT.D/PHP-FPM {start|stop|quit|restart| Reload|logrotate}
      Note:

    7. There may be a 502 error accessing the Web page, viewing nginx error.log found the following log:

      2018/ 08/02 06:44:20 [Crit] 11744#0: *46 connect () to Unix:/tmp/php-cgi.sock failed (2:no such file or directory) while Connect ing to upstream, client:114.244.134.66, server:tpshop.goldblockchain.org.cn, Request: "get/http/1.1", Upstream: "FASTC Gi://unix:/tmp/php-cgi.sock: ", Host:" tpshop.goldblockchain.org.cn "

Requires nginx.conf with php-fpm.conf about/tmp/php-cgi.sock configuration to be unified, because the sock name will be different if you install another version of PHP

LNMP installing multiple Versions of PHP

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.