Monday, November 4, 2019

How to enable https backends in nginx without adding back-end server's certificates

lets assume that we have a requirement to proxy from https://nginxserverip:443 to https://backendserverip:443 as mentioned below,


below is a code sample,
server {
server_name nginxserverip;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host backendserverip;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
proxy_pass https://backendserverip/;
}
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate xxxxxxx.pem;
ssl_certificate_key xxxxxxxx.pem;
}
that’s it.

2 comments:

  1. I feel tools such as SQL and various other tools and commands alongwith REST API are very useful for beginners and even qualified professionals to find out about solutions in the testing phase.

    SQL Server Load Soap Api



    ReplyDelete