NGINX - 未指定输入文件.- php 快速/CGI [英] NGINX - No input file specified. - php Fast/CGI
本文介绍了NGINX - 未指定输入文件.- php 快速/CGI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要帮助为 nginx 设置配置.我是 NGINX 的新手,遇到了一些问题.
Hi I need help in setting config for nginx. I am new to NGINX and facing some issues.
在我的 sites-available
中有 default
文件
In my sites-available
there is default
file
它包含以下代码
server {
server_name www.test.com test.com;
access_log /sites/test/logs/access.log;
error_log /sites/test/logs/error.log;
root /sites/test;
location ~ / {
index index.php
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
当我写 URL 时,上面的代码工作得很好
Above code works perfectly when I write URL
www.test.com/service/public/
我写的时候
www.test.com/service/public/testservice
(testservice 是 public 中的文件夹)它说未指定输入文件.
www.test.com/service/public/testservice
(testservice is folder within public) it says No input file specified.
如何解决.提前致谢.
我在下面尝试过,但没有运气
I tried below, but no luck
http://nginxlibrary.com/resolving-no-input-file-specified-error/
http://blog.martinfjordvald.com/2011/01/no-input-file-specified-with-php-and-nginx/
推荐答案
必须在
location ~ .$php{
#......
include fastcgi.conf;
}
这篇关于NGINX - 未指定输入文件.- php 快速/CGI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文