nginx 错误日志
操作系统 centos 6.3
ruby 版本 ruby 1.9.3p362 (2012-12-25 revision 38607) [i686-linux]
2013/01/1 10:37:18 [error] 3160#0: *28438 upstream prematurely closed connection while reading response header from upstream, client: 192.168.3.100, server: sdutlinux.org, request: "GET /go/party HTTP/1.1", upstream: "passenger:unix:/passenger_helper_server:", host: "sdutlinux.org", referrer: "http://sdutlinux.org/"
nginx 配置 文件
server {
client_max_body_size 20M;
listen 80;
server_name sdutlinux.org www.sdutlinux.org test.sdutlinux.org;
root /home/rails/sdutlinux/current/public;
rails_env production;
passenger_enabled on;
proxy_buffering on;
proxy_buffers 16 32k;
proxy_buffer_size 64k;
passenger_buffers 16 32k;
passenger_buffer_size 64k;
#proxy_ignore_client_abort on;
#access_log logs/host.access.log main;
access_log /home/rails/sdutlinux/current/log/nginx.access.log;
error_log /home/rails/sdutlinux/current/log/nginx.error.log info;
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
gzip_static on;
expires 1y;
add_header Cache-Control public;
#root html;
#index index.html index.htm;
}
}
nginx.conf
user rails;
worker_processes 4;
events {
worker_connections 1024;
}
http {
passenger_root /usr/local/rvm/gems/ruby-1.9.3-p362/gems/passenger-3.0.17;
passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p362/ruby;
passenger_max_pool_size 100;
#passenger_spawn_method conservative;
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 165;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
include sites/*;
}