Last active
May 10, 2019 01:58
-
-
Save jinseokoh/cf21d257fda1d858e298c7322e8b2c5b to your computer and use it in GitHub Desktop.
nginx config for Jenkins
This file contains 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 default_server; | |
server_name localhost; | |
location / { | |
proxy_pass http://localhost:8080; | |
proxy_set_header Host $host:$server_port; | |
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_connect_timeout 120; | |
proxy_send_timeout 100; | |
proxy_buffers 4 32k; | |
client_max_body_size 8m; | |
client_body_buffer_size 128k; | |
# Required for new HTTP-based CLI | |
proxy_http_version 1.1; | |
proxy_request_buffering off; | |
proxy_buffering off; # Required for HTTP-based CLI to work over SSL | |
# workaround for https://issues.jenkins-ci.org/browse/JENKINS-45651 | |
add_header 'X-SSH-Endpoint' 'jenkins.example.com:50022' always; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment