-
今天使用nginx对nacos集群进行负载均衡报错:页面报错
HTTP Status 400 – Bad Request
-
查看日志
192.168.198.1 - - [07/May/2023:22:12:21 +0800] "GET /nacos HTTP/1.1" 400 435 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
- nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream nacoscluster{
server 192.168.198.129:8849;
server 192.168.198.129:8859;
server 192.168.198.129:8869;
}
server {
listen 8001;
server_name localhost;
location /nacos {
proxy_pass http://nacoscluster;
}
}
server {
listen 80;
server_name localhost;
#charset koi8-r