Skip to content

Instantly share code, notes, and snippets.

@vvdaal
Created April 17, 2020 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvdaal/a3991293b47a5a8c6e7bc394ef5d8048 to your computer and use it in GitHub Desktop.
Save vvdaal/a3991293b47a5a8c6e7bc394ef5d8048 to your computer and use it in GitHub Desktop.
Nginx config to reverse proxy to something that uses SSL
server_name www.servername1.tld servername1.tld;
access_log /var/log/nginx/www.servername1.tld_access.log;
error_log /var/log/nginx/www.servername1.tld_error.log;
location / {
proxy_pass https://YOUR-IP-ADDRESS-OF-BACKEND;
proxy_set_header Host $host;
proxy_ssl_name $host;
proxy_ssl_verify off;
proxy_ssl_server_name on;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment