- 论坛徽章:
- 0
|
nginx index.html 静态页面是正常的,动态页面index.php报404的错误
nginx.conf 中fastcgi的配置,fastcgi_param 下面两种都不可
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
include fastcgi_params;
}
在nginx 的html目录下添加了index.php
<?php
phpinfo();
?>
php-fpm已经起来了,
$ ps -aux | grep php-fpm
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 12949 0.0 0.1 24768 3156 ? Ss 10:24 0:00 php-fpm: master process (/opt/php/etc/php-fpm.conf)
yyt 12950 0.0 0.1 24768 2592 ? S 10:24 0:00 php-fpm: pool www
yyt 12951 0.0 0.1 24768 3300 ? S 10:24 0:00 php-fpm: pool www
php.ini把cgi.fix_pathinfo改为1
cgi.fix_pathinfo=1
ps -aux|grep php ,只看到php-fpm 进程,没有看到php-cgi的进程
谢谢了! |
|