Last active
September 5, 2017 18:55
-
-
Save alexleventer/f4bdb2efe1c70e82cba289df04bb4224 to your computer and use it in GitHub Desktop.
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
server { | |
listen 80; | |
return 301 https://$host$request_uri; | |
} | |
# HTTPS server | |
# | |
server { | |
listen 443 ssl; | |
server_name jenkins.tred.com; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/nginx.crt; | |
ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_pass http://localhost:8080; | |
proxy_read_timeout 90; | |
proxy_redirect http://localhost:8080 https://jenkins.tred.com; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment