nginx showing blank PHP pages

前端 未结 17 2233
走了就别回头了
走了就别回头了 2020-12-04 05:56

I have setup an nginx server with php5-fpm. When I try to load the site I get a blank page with no errors. Html pages are served fine but not php. I tried turning on disp

17条回答
  •  长情又很酷
    2020-12-04 06:09

    For reference, I am attaching my location block for catching files with the .php extension:

    location ~ \.php$ {
        include /path/to/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
    }
    

    Double-check the /path/to/fastcgi-params, and make sure that it is present and readable by the nginx user.

提交回复
热议问题