Skip to content

Instantly share code, notes, and snippets.

@jcfrank
Last active August 29, 2015 14:15
Show Gist options
  • Save jcfrank/98c5b0c3352893f08675 to your computer and use it in GitHub Desktop.
Save jcfrank/98c5b0c3352893f08675 to your computer and use it in GitHub Desktop.
nginx reverse proxy for https example

Virtual host config

Generally put under /etc/nginx/sites-available/, then put soft link under /etc/nginx/sites-enabled/.
ex. /etc/nginx/sites-available/https_proxy

upstream actual {
        server actual-hostname:443;
        server actual-hostname2:443;
}

server {
        listen 443 ssl;
        server_name franks.com;

        ssl on;
        ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_certificate /root/server.crt;
        ssl_certificate_key /root/server.key;

        location / {
                proxy_pass https://actual;
        }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment