Created
August 5, 2020 21:29
-
-
Save leogsilva/243448f224c514f58bb3d68ef5d2d676 to your computer and use it in GitHub Desktop.
nginx configuration template file for simple reverse proxy server
This file contains hidden or 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
| upstream demo2.localhost { | |
| server ${UPSTREAM}; | |
| } | |
| server { | |
| #ssl_certificate /etc/nginx/certs/demo.pem; | |
| #ssl_certificate_key /etc/nginx/certs/demo.key; | |
| gzip_types text/plain text/css application/json application/x-javascript | |
| text/xml application/xml application/xml+rss text/javascript; | |
| proxy_set_header HOST $host; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| location / { | |
| proxy_pass http://demo2.localhost; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment