เป็นไปได้หรือไม่ที่จะกำหนดค่า nginx ให้ใช้รุ่น TLS1.2 สำหรับ IP บางตัวและ TLS1.0 สำหรับ IP ที่ผู้ใช้กำหนด
เป็นไปได้หรือไม่ที่จะกำหนดค่า nginx ให้ใช้รุ่น TLS1.2 สำหรับ IP บางตัวและ TLS1.0 สำหรับ IP ที่ผู้ใช้กำหนด
คำตอบ:
ใช่คุณสามารถปล่อยให้หนึ่งserver
บล็อกฟังชุดแรกของ IPS (และกำหนดค่าบล็อกนั้นโดยใช้ TLSv1.2) และให้server
บล็อกอื่นฟังด้วยที่อยู่ IP อื่น ๆ ในบล็อกหลังคุณจะกำหนดค่า TLSv1.0 เท่านั้น
ตัวอย่างจะเป็น
server {
listen 1.1.1.1:443 ssl;
server_name tls1_0.example.com;
ssl_certificate /etc/nginx/ssl/example.com.crt;
ssl_certificate_key /etc/nginx/ssl/example.com.key;
ssl_protocols TLSv1;
ssl_ciphers "_cleared_for_brevity_";
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
// ..other config
tcp_nodelay on;
}
server {
listen 1.1.1.2:443 ssl;
server_name tls1_2.example.com;
ssl_certificate /etc/nginx/ssl/example.com.crt;
ssl_certificate_key /etc/nginx/ssl/example.com.key;
ssl_protocols TLSv1.2;
ssl_ciphers "_cleared_for_brevity_";
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
// ..other config
tcp_nodelay on;
}