下面的为 www.my123.com.conf 文件,为何其它的两个站点,也用的这个模板,都能正常执行 php 文件,而这个一执行 www.my123.com/任意存在的.php 文件,都提示: No input file specified.重启几次都无果。
server
{
listen 80;
#listen [::]:80;
server_name www.my123.com my123.com;
if ($host != 'www.my123.com' ) {
rewrite ^/(.*)$ http://www.my123.com/$1 permanent;
}
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.my123.com;
include other.conf;
#error_page 404 /404.html;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/www.my123.com.log access;
}