我安装了nginx 1.12.1作为反向代理,运行Apache httpd 2.4.25 x64 我有一个带有cento 6.9的vmware虚拟机。我有一个工作堆栈apache httpd 2.4.25 ---(mod_jk 1.2.42)--- Tomcat 7.0.81 ---(jdbc)--- MySQL服务器5.7.19。 现在我已经安装并配置Nginx在Apache(反向代理)前工作。 它自三天起不起作用(使用curl或mozilla浏览器)。 错误消息是400 Bad Request:Request Header或Cookie Too Large
有人能帮助我吗?
这是我的/etc/nginx/nginx.conf
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.core.log warn;
pid /var/run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
include /etc/nginx/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 /var/log/nginx/access.core.log main;
sendfile on;
keepalive_timeout 65;
client_max_body_size 200M;
client_body_buffer_size 32k;
client_header_buffer_size 64k;
large_client_header_buffers 4 64k;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
include /etc/nginx/conf.d/*.conf;
}
我的默认服务器配置:
server {
listen 80;
server_name localhost;
charset utf-8;
access_log /var/log/nginx/access.http.mydomain.log;
error_log /var/log/nginx/error.http.mydomain.log;
location / {
proxy_pass http://127.0.0.1:8080/;
root /opt/rh/httpd24/root/var/www/html/html;
index index.html index.htm;
include /etc/nginx/conf.d/proxy.inc;
client_max_body_size 10m;
client_body_buffer_size 128k;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}