Infra_HDC icon

nginx ssl passthrough

Infra_HDC | PRO | 06/30/18 01:23:03 PM UTC | 0 ⭐ | 932 👁️ | Never ⏰ | []
Bash |

880 B

|

None

|

0 👍

/

0 👎

http {
server {
    # сначала по книжке, ISBN 978-5-94074-961-5, стр. 99
#       listen 443 default ssl;
        listen 443 ssl;
 
    # два хостнейма, см. https://habr.com/post/142363/
        server_name host.example.com host2.example.com;
 
        ssl on;
        #ssl_prefer_server_ciphers on;
        #ssl protocols TLSv1 SSLv3;
        #ssl_ciphers RC4:HIGH:!aNUL:!MD5:@STRENGTH;
        #ssl_session_cache shared:WEB 10m;
        ssl_certificate /path/to/example.com.bundle.crt;
        ssl_certificate_key /path/to/example.com.key;
 
        location / {
        # https://serveradmin.ru/nginx-proxy_pass/
        proxy_pass http://192.168.aaa.bbb;
        proxy_set_header X-FORWARDED-PROTO https;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        }
}
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎