Nginx TLS redirect ขึ้นอยู่กับที่อยู่ IP


-1

เป็นไปได้หรือไม่ที่จะกำหนดค่า nginx ให้ใช้รุ่น TLS1.2 สำหรับ IP บางตัวและ TLS1.0 สำหรับ IP ที่ผู้ใช้กำหนด

คำตอบ:


0

ใช่คุณสามารถปล่อยให้หนึ่ง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;
}

ขอบคุณเราสามารถกำหนดค่าเครือข่ายที่แตกต่างกันแทนที่อยู่ IP ที่เฉพาะเจาะจง
Astar
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.