-
-
Save derek-schaefer/56f62caf8c00c7258f82db877a584904 to your computer and use it in GitHub Desktop.
Opternative branded reverse proxy hostname example for Nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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