2014-07-03 163 views
7

我有2個Nginx服務器server1server2server1需要客戶端ssl驗證。 服務器2代理的所有請求到Server1Nginx ssl_verify_client和proxy_pass

的問題是當我試圖直接從Server1上的瀏覽器訪問我的服務要求我的客戶端證書,它工作正常

但從servier2它總是給錯誤「400錯誤的請求不需要SSL證書被送到」

server1的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; 
} 
} 

Server2上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; 
} 
} 
+0

這個問題似乎是題外話,因爲它不是關於節目。請參閱幫助中心內的[我可以詢問哪些主題](https://stackoverflow.com/help/on-topic)。也許[服務器故障](http://serverfault.com/)或[Webmaster Stack Exchange](http://webmasters.stackexchange.com/)會是一個更好的地方。 – jww

回答