Commit a46bb8cb by Jillian Vogel

Adds jenkins_protocol_https

When set to 'true' (default value), configures nginx with proxy_redirect from http: to https:

When set to 'false', the proxy allows http: requests without redirecting to https:.

Ref https://github.com/edx/edx-analytics-configuration/blob/master/roles/jenkins/templates/etc/nginx/sites-available/jenkins.j2#L8-L11
parent db8df3a0
......@@ -4,6 +4,7 @@ jenkins_group: "edx"
jenkins_server_name: "jenkins.testeng.edx.org"
jenkins_port: 8080
jenkins_nginx_port: 80
jenkins_protocol_https: true
jenkins_version: "1.638"
jenkins_deb_url: "http://pkg.jenkins-ci.org/debian/binary/jenkins_{{ jenkins_version }}_all.deb"
......
......@@ -5,8 +5,10 @@ server {
location / {
proxy_pass http://localhost:{{ jenkins_port }};
{% if jenkins_protocol_https %}
# Rewrite HTTPS requests from WAN to HTTP requests on LAN
proxy_redirect http:// https://;
{% endif %}
# The following settings from https://wiki.jenkins-ci.org/display/JENKINS/Running+Hudson+behind+Nginx
sendfile off;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment