Skip to content

Instantly share code, notes, and snippets.

@derek-schaefer
Created Nov 6, 2017
Embed
What would you like to do?
Opternative branded reverse proxy hostname example for Nginx
daemon off;
events {
worker_connections 1024;
}
http {
access_log /dev/stdout;
error_log /dev/stderr;
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name localhost;
ssl on;
ssl_certificate ./ssl.crt;
ssl_certificate_key ./ssl.key;
location / {
proxy_set_header Host $host;
proxy_pass https://staging.opternative.com/;
proxy_redirect default;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment