Created
November 20, 2013 15:56
-
-
Save spikeheap/7565560 to your computer and use it in GitHub Desktop.
Sample nginx conf for Jenkins
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
upstream jenkins { | |
server 127.0.0.1:9000 fail_timeout=0; | |
} | |
server { | |
access_log /opt/boxen/log/jenkins/sonar.access.log; | |
error_log /opt/boxen/log/jenkins/sonar.error.log; | |
listen 80; | |
server_name jenkins.dev; | |
client_max_body_size 50M; | |
error_page 500 502 503 504 /50x.html; | |
if ($host ~* "www") { | |
rewrite ^(.*)$ http://jenkins.dev$1 permanent; | |
break; | |
} | |
location / { | |
proxy_buffering off; | |
proxy_max_temp_file_size 0; | |
proxy_redirect off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_pass http://jenkins.dev; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment