2

Edited: This error only occurs when I'm using Chrome. If I switch to Safari or FireFox, my server code works OK.

Here's the error log. Please help. I'm playing with the Google OAuth 2.0 API and there's something wrong after Google calls my server back.

Let me know if you need more information to diagnose. (I'm a super newbie so I've no idea what to paste here...)

Besides, 114.247.XXX.YYY is my local office IP, with which I'm browsing websites and accessing remote servers.

2012/06/28 09:54:08 [error] 2170#0: *21 upstream sent too big header
while reading response header from upstream, client: **114.247.XXX.YYY**,
server: my_domain_name.com, request: "GET
/login-callback/google?state=my_randomly_generated_state&code=my_google_authorization_code
HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "my_domain_name.com"
4

1 回答 1

2

好的,我也有这个问题,但是在每个浏览器中。

验证您是否没有监听套接字。

纳米 /etc/php5/fpm/pool.d/www.conf

我的解决方案是:

$ sudo nano /etc/nginx/sites-available/default

server {
[...]
location ~ \.php$ {
  root /your/site/root;
  fastcgi_index index.php;
  include fastcgi_params;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

  fastcgi_pass 127.0.0.1:9000;
  #IF you are using a socket change the line above for thise one:
  #fastcgi_pass    unix:/var/run/php5-fpm.sock;

  ###to be sure validate on /etc/php5/fpm/pool.d/www.conf
  ####listen = 127.0.0.1:9000 #not a socket
  ####listen = /var/run/php5-fpm.sock #listen a socket


  # add these two lines:
  fastcgi_buffer_size 16k;
  fastcgi_buffers 4 16k;
}
[...]
}
$sudo service nginx restart

来源:点击这里

于 2012-10-11T11:09:34.823 回答