Nginx-php5-fpm-Ubuntu14.04 install nginx + php5-fpm after accessing php page blank, how to solve?

Source: Internet
Author: User
Add fastcgi_paramSCRIPT_FILENAME $ document_root $ fastcgi_script_name on the Internet. The problem persists! Add by online

Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;

Still invalid. solve it!

Reply content:

Add by online

Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;

Still invalid. solve it!

I had a hard time tossing this problem yesterday. I was furious:

Check whether the following two lines exist in the/etc/nginx/fastcgi_params file.

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;fastcgi_param  PATH_INFO          $fastcgi_script_name;

Check your nginx error log. If the error 403 is reported:

Confirm the operating users of nginx and php-fpm

 ps aux | grep nginx ps aux | grep php-fpm

If no www-data user is found in nginx, add the following code to the nginx configuration file and restart (/etc/nginx. conf)

user www-data www-data;

Open the/etc/php5/fpm/pool. d/www. conf file and remove the comments of the following three lines:

listen.owner = www-datalisten.group = www-datalisten.mode = 0660

This is all the problems I encountered. You can try it. In short, you should first read the log and then solve the problem according to the log. If the problem persists, you 'd better paste your log to see it.

Let's take a look at how php-fpm runs on your machine.

ss --unix --all | grep php

Modify the corresponding configuration file according to the output of the above commandserver {}Infastcgi_pass

For more information, see nginx-ArchWiki.

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.