Docs/其他/php程序启动报no input file.txt
2022-10-18 16:59:37 +08:00

25 lines
No EOL
585 B
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1、 php.ini(/etc/php/cgi/php.ini)的配置中这两项
fastcgi.impersonate = 1
cgi.fix_pathinfo=1 (这个是自己添加的)
cgi.force_redirect = 0
doc_root=
2、nginx配置文件/etc/nginx/sites-available/default中注意以下部分
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
上面的部分路径需要根据你主机主目录的实际情况填写
配置完以上部分重启一下service nginx restart应该没问题了