Example nginx SSL Reverse Proxy config

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
  upstream proxy {
        server 10.150.161.22:8080;
        }

        server {
           listen 8443;
           server_name 195.69.213.78;

        ssl on;
        ssl_certificate ssl/test.crt;
        ssl_certificate_key ssl/test.key;
        ssl_session_cache shared:SSL:10m;

    location / {

        proxy_pass http://proxy; # my existing apache instance
        proxy_set_header X-Forwarded-For $remote_addr; # Strip and add a clean forwarded for header

        # re-write redirects to http as to https, example: /home
        proxy_redirect http:// https://;
    }
  }
}

http {
  upstream proxy {
        server 10.150.161.22:80;
        }

        server {
           listen 8080;
           server_name 195.69.213.78;

    location / {

        proxy_pass http://proxy; # my existing apache instance
        proxy_set_header X-Forwarded-For $remote_addr;

        # re-write redirects to http as to https, example: /home
        #proxy_redirect http:// https://
    }
  }
}

http {
  upstream proxy {
        server ukstrosxsus01.pearson.com:8088;
        }

        server {
           listen 8088;
           server_name 195.69.213.78;

    location / {

        proxy_pass http://proxy; # my existing apache instance
        proxy_set_header X-Forwarded-For $remote_addr;

        # re-write redirects to http as to https, example: /home
        #proxy_redirect http:// https://
    }
 }
}