你好:
我在用nginx时,当我用post方法提交时,服务器返回Illegal request。看了看错误,4 client closed prematurely connection, so upstream connection is closed too (104: Connection reset by peer) while sending request to upstream
。我的配置文件:worker_processes 1;
daemon off;
master_process off;
error_log logs/debug.log debug;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream backend {
server 10.10.151.118:80; # client addr == 10.10.151.123 and nginx server addr == 10.10.151.99
}
server {
listen 808;
server_name www.domain.com;
location / {
proxy_pass http://backend;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
proxy_pass http://127.0.0.1;
}
}
}