gpt4 book ai didi

ssl - Nginx ssl_verify_client 和 proxy_pass

转载 作者:太空宇宙 更新时间:2023-11-03 12:43:48 27 4
gpt4 key购买 nike

<分区>

我有 2 个 Nginx 服务器 server1server2server1 需要客户端 ssl 验证。server2 将所有请求代理到server1

问题是当我尝试直接从 server1 访问我的服务时,浏览器询问我的客户端证书并且它工作正常

但是从 servier2 开始,它总是给出错误“400 Bad Request. No required SSL certificate was sent”

服务器1的nginx配置是

server {
listen 443;
server_name server1 ;
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_client_certificate /etc/nginx/client_keys/keys.crt;
ssl_verify_client on;
ssl_verify_depth 1;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;

location / {
proxy_pass https://some-service;
}
}

服务器2的nginx配置是

server {
listen 443 default_server;
server_name server2;
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_client_certificate /etc/nginx/client_keys/keys.crt;
location / {
proxy_pass https://server1;
}
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com