hongming 我按照这个配置在登录的时候一直报" 用户名或密码错误" 后台401,但是同样的密码可以用内网IP通过nodeport登录成功,反代到外网就不行:
#nginx
upstream ksconsole {
server 192.168.13.28:30880;
}
location / {
proxy_pass http://ksconsole;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
<-- POST /login 2020/10/28T07:36:11.897
Unauthorized P {
size: 0,
timeout: 0,
[Symbol(Body internals)]:
{ body:
PassThrough {
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: true,
_transformState: [Object] },
disturbed: true,
error: null },
[Symbol(Response internals)]:
{ url: 'http://ks-apigateway.kubesphere-system.svc/kapis/iam.kubesphere.io/v1alpha2/login',
status: 401,
statusText: 'Unauthorized',
headers: C { [Symbol(map)]: [Object] } } } false
{ code: 401,
message: 'LDAP Result Code 49 "Invalid Credentials": ',
statusText: 'Unauthorized' }
--> POST /login 200 39ms 16.15kb 2020/10/28T07:36:11.936
<-- GET /kapis/monitoring.kubesphere.io/v1alpha2/namespaces/tfsmy-springboot/pods?ownerKind=Deployment&ownerName=commercial-house-api&resources_filter=commercial-house-api-76df6f7896-ldsht%24&metrics_filter=pod_cpu_usage%7Cpod_memory_usage_wo_cache%24 2020/10/28T07:36:12.812