我有 2 个 Nginx 服务器 server1 和 server2。server1 需要客户端 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;
}
}
我是一名优秀的程序员,十分优秀!