Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Nginx SSL config for proxying to jenkins
upstream jenkins {
server fail_timeout=0;
server {
listen 80;
server_name {{ jenkins_url }};
rewrite ^ https://$server_name$request_uri? permanent;
server {
listen 443 ssl;
server_name {{ jenkins_url }};
ssl_certificate {{ your_cert_path }};
ssl_certificate_key {{ your_key_path }};
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers HIGH:!ADH:!MD5;
ssl_prefer_server_ciphers on;
location / {
# be paranoid
allow; # trusted networks only
deny all;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect http:// https://;
add_header Pragma "no-cache";
proxy_pass http://jenkins;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.