上游发送不支持的协议版本 [英] Upstream sent unsupported protocol version
本文介绍了上游发送不支持的协议版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在 nginx 上设置 symfony.下面是配置 -
I am trying to setup symfony on nginx. Below are the configuration -
upstream phpfcgi {
server 127.0.0.1:9000;
# server unix:/var/run/php5-fpm.sock; #for PHP-FPM running on UNIX socket
}
server{
listen 80;
server_name xxy.xxy.com;
root /home/abcdef/website/current/web;
location / {
# try to serve file directly, fallback to rewrite
try_files $uri @rewriteapp;
}
location @rewriteapp {
# rewrite all to app.php
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ ^/(app|app_dev|config)\.php(/|$) {
fastcgi_pass phpfcgi;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
}
我收到此错误
2013/12/12 11:23:55 [error] 25515#0: *5 upstream sent unsupported FastCGI protocol version: 60 while reading response header from upstream, client: 111.84.98.65, server: xxy.xxy.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxy.xxy.com"
有人可以帮助我吗?
推荐答案
检查
netstat -tap
查看其他应用程序是否正在侦听端口 9000.如果是,请尝试杀死它
to see if another application is listening on port 9000. If so try to kill it
kill -l PID
或更改您的 nginx 配置中的端口.当配置的端口已被使用时,您的错误通常会发生.
or change the port in your nginx config. Your error often happens when the configured port is already in use.
这篇关于上游发送不支持的协议版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文