Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Jenkins configuration for Nginx reverse proxy
http {
# SSL Settings
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 180m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_tickets off;
ssl_certificate /certs/cert.crt;
ssl_certificate_key /certs/cert.key;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5;
# Proxy settings
proxy_set_header X-Real-IP $remote_addr;
proxy_ssl_session_reuse on;
server {
server_name external.address.tld;
listen 443 ssl;
ignore_invalid_headers off;
location / {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_pass http://jenkins.internal.address:8080;
# The following address CANNOT HAVE SLASH AT THE END!
# If it has the slash you will see the error
# "It appears that your reverse proxy set up is broken"
proxy_redirect http://jenkins.internal.address:8080 https://external.address.tld;
}
}
}
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.