LNMP提示Nginx PHP “No input file specified”错误因配置文件有改变

lnmp1.0升级到1.4新版本 ,出现“No input file specified”错误提示,尝试添加新的虚拟主机,比较后发现nginx conf配置文件php部分有改变,需要注意。

旧版的:


1
2
3
4
5
6
7
location ~ .*\.(php|php5)?$
        {
            try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fcgi.conf;
        }

新版的:

1
include enable-php.conf;

如果照搬会出现“No input file specified”错误提示。

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this post. TrackBack URL