【发布时间】:2014-11-27 15:01:01
【问题描述】:
这是我来自 nginx 的 error.log:
2014/10/02 14:51:29 [error] 15936#0: *1 FastCGI sent in stderr: "Primary script unknown" 同时从上游读取响应标头,客户端:134.106.87.55,服务器:sumomo.shitteru2 .net,请求:“GET /index.php HTTP/1.1”,上游:“fastcgi://unix:/var/run/php5-fpm.sock:”,主机:“sumomo.shitteru2.net”
这是我启用的网站:
server {
listen 80;
server_name sumomo.shitteru2.net;
index index.php index.html index.htm;
location / {
root /mnt/firstsite;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
据我所知,一切都非常简单,所以它应该可以工作。我什至直接从http://wiki.nginx.org/PHPFcgiExample#Connecting_nginx_to_PHP_FPM 复制了它。你们有没有发现任何潜在的问题?
【问题讨论】: