Advertisement
Infra_HDC

nginx ssl passthrough

Jun 30th, 2018
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.88 KB | None | 0 0
  1. http {
  2. server {
  3.     # сначала по книжке, ISBN 978-5-94074-961-5, стр. 99
  4. #       listen 443 default ssl;
  5.         listen 443 ssl;
  6.  
  7.     # два хостнейма, см. https://habr.com/post/142363/
  8.         server_name host.example.com host2.example.com;
  9.  
  10.         ssl on;
  11.         #ssl_prefer_server_ciphers on;
  12.         #ssl protocols TLSv1 SSLv3;
  13.         #ssl_ciphers RC4:HIGH:!aNUL:!MD5:@STRENGTH;
  14.         #ssl_session_cache shared:WEB 10m;
  15.         ssl_certificate /path/to/example.com.bundle.crt;
  16.         ssl_certificate_key /path/to/example.com.key;
  17.  
  18.         location / {
  19.         # https://serveradmin.ru/nginx-proxy_pass/
  20.         proxy_pass http://192.168.aaa.bbb;
  21.         proxy_set_header X-FORWARDED-PROTO https;
  22.         proxy_set_header Host $host;
  23.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  24.         proxy_set_header X-Real-IP $remote_addr;
  25.         }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement