Lnmp平台Nginx返回 PHP文件报File not found

Lnmp平台Nginx返回  PHP文件报File not found

在搭建Lnmp平台时,做Nginx整合php是打算用phpinfo查看php是否配置正确。结果坑爹了

 

vim /etc/nginx/conf.d/default.conf

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
php

 

phpinfo文件内容

<?php
phpinfo();
?>

Comments

No comments yet. Why don’t you start the discussion?

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注