Home > Backend Development > PHP Tutorial > nginx php No input file specified 如何避免

nginx php No input file specified 如何避免

WBOY
Release: 2016-06-13 12:01:56
Original
858 people have browsed it

nginx php No input file specified 如何处理?

配置nginx支持php 出现了No input file specified ?

只要修改下安装目录下的  nginx.conf下的

 location ~ \.php$ {
             root           html;
             fastcgi_pass   127.0.0.1:9000;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
             include        fastcgi_params;
         }

修改成

 location ~ \.php$ {
             root           html;
             fastcgi_pass   127.0.0.1:9000;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  /usr/local/nginx/html/$fastcgi_script_name;    #安装的绝对路径
             include        fastcgi_params;
         }

重启nginx

/usr/local/nginx/sbin/nginx -s reload

成功运行php脚本



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template