I have 2 SSL webservers that I have to handle with nginx. I also have a http server (the redirection works fine).
The redirections works well when i handle just http and https (only one ssl webserver).
The problem is, when i want to handle 2 ssl webserver:
na.test.lan for https nnm.toast.lan for https
The request for https is handled by the first server block file that redirect me on the wrong ssl webserver (maybe the first server block that listen on port 443).
Here is my ssl.conf :
server {
listen 443;
server_name na.test.lan ;
ssl on;
ssl_certificate /etc/pki/nginx/server.crt;
ssl_certificate_key /etc/pki/nginx/server.key;
ssl_session_timeout 1m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://172.17.100.200/; }
}
server {
listen 443;
server_name nnm.toast.lan ;
ssl on;
ssl_certificate /etc/pki/nginx/server.crt;
ssl_certificate_key /etc/pki/nginx/server.key;
ssl_session_timeout 1m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://179.60.192.3/; }
}