PHP file prompts to save or display source solution in LNMP environment

Source: Internet
Author: User

As the title, the basic reason for this problem is that the LNMP environment has not been built. The title of the environment is because Nginx can not parse your PHP file code, so the server will be the PHP suffix file for general file processing. Most of these problems appear on the PHP-FPM node. Therefore, we should start from this aspect.
1. Check the Nginx configuration, parsing the static HTML file is not a problem;
2. Check whether the normal operation of PHP-FPM, (start the service after the terminal execution: Ps-ef |grep php-fpm can check);
3. Check nginx.conf configuration, mainly check the following content:

Check Nginx Configuration

Check the original by default configuration Fastcgi_param script_filename/scripts$fastcgi_script_name;
Whether modified for Fastcgi_param script_filename $document _root$fastcgi_script_name;
after confirmation, restart the related services. or reboot the Nginx related services directly, and make sure that the related services are working properly.

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.