Thanks to visit codestin.com
Credit goes to github.com

Skip to content

nacos 2.2.0 版本,配置 nginx 反向代理时,无法通过 nginx 反向代理修改 nacos 密码 #9819

@JRU1

Description

@JRU1

Nginx 配置如下:

upstream nacos-server {
server 172.31.1.186:8848 weight=1 max_fails=2 fail_timeout=30s;
server 172.31.1.186:8850 weight=1 max_fails=2 fail_timeout=30s;
server 172.31.1.186:8852 weight=1 max_fails=2 fail_timeout=30s;
}

server {
listen 8000;
server_name localhost;
charset utf-8;
default_type text/html;

location ~ /nacos/* {
    proxy_pass http://nacos-server;
    client_body_buffer_size 10M;
    client_max_body_size 10G;
    proxy_buffers 1024 4k;
    proxy_read_timeout 300;
    proxy_next_upstream error timeout http_404;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Cookie $http_cookie;
    proxy_pass_header User-Agent;
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions