Setup SSL on nginx Proxy Server Servername

If you are using nginx as your reverse proxy server to point your domains to the real hosts and you wish to setup  SSL on your servername use following configuration for your server_name:

server {

    server_name your_server_name_domain_addr;
    listen 443 ssl;
    ssl_certificate     /your_crt_file_address.crt;
    ssl_certificate_key /your_key_file_address.key;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;
    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_pass http://your_destination_ip_address:80;
    }

    access_log /address_to_your_access_your_file;
    error_log  /address_to_your_error_log_file;
}

 

Incoming search terms:

  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1825 Z3IHlhzxYf1rYhPtAyGjQEZi_wM_BavCgXanxvlml68zj9CoaI3GaQ19wLghHISC 9aa797ce8169108f52054eac53d3e71fb1bc786e&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme

Leave a Reply