Created
June 8, 2015 16:02
-
-
Save serkanh/54fe57a7a826da6105b4 to your computer and use it in GitHub Desktop.
jira-stash-nginx-https
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
index index.html index.htm; | |
server { | |
root /usr/share/nginx/html; | |
listen 443; | |
server_name git.example.com; | |
access_log off; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/nginx.crt; | |
ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
location / { | |
proxy_redirect off; | |
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-Protocol $scheme; | |
proxy_pass http://127.0.0.1:7990/; | |
} | |
} | |
server { | |
root /var/bamboo; | |
server_name bamboo.example.com; | |
location / { | |
proxy_redirect off; | |
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-Protocol $scheme; | |
proxy_pass http://127.0.0.1:8085/; | |
} | |
} | |
server { | |
listen 80; | |
server_name *.example.com; | |
access_log off; | |
#return 301 https://$server_name$request_uri; | |
return 301 https://$host$request_uri$is_args$args; | |
} | |
server { | |
root /usr/share/nginx/html; | |
listen 443 default_server; | |
server_name jira.example.com; | |
access_log off; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/nginx.crt; | |
ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
location / { | |
proxy_redirect off; | |
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-Protocol $scheme; | |
proxy_pass http://localhost:8080/; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment