Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Configure nginx to proxy http://jenkins.dev/ #2

Merged
merged 1 commit into from about 1 year ago

2 participants

Tim Taylor Lars Bilke
Tim Taylor

The jenkins.conf template was almost there. What remained was to add a proxy_pass directive for location /.

  • proxies to upstream jenkins server
  • configures recommended proxy settings
  • upstream renamed from jenkins.devjenkins to make it clearer in the nginx config that it's an upstream and not the actual hostname
  • fixes boxen/our-boxen#197

This is working on my Mac Mini using the our-boxen template with only java and jenkins modules added.

Lars Bilke bilke merged commit 9a11a5c into from April 04, 2013
Lars Bilke bilke closed this April 04, 2013
Lars Bilke
Owner
bilke commented April 04, 2013

Nice work, thanks!

BTW: Do you know how to test changes to the module locally? When I change something in /opt/boxen/repo/shared/jenkins/ the changes get overridden when running boxen. So I am always doing a

git commit
git tag x.x.x
git push --tags

to my Jenkins repo and then updating my Puppetfile to pull in the changes. There must be an easier way?

Lars Bilke bilke referenced this pull request in boxen/our-boxen April 05, 2013
Closed

puppet-jenkins #197

Tim Taylor toolbear deleted the branch April 05, 2013
Tim Taylor

Yes, boxen caches the extracted tarball under /opt/boxen/repo/.tmp/librarian/cache/source/puppet/githubtarball/. You can edit that source directly to try out a change.

Lars Bilke bilke referenced this pull request from a commit June 29, 2013
Adam Ochonicki Build status
Fixes #2
c79ba86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Apr 04, 2013
Tim Taylor configure nginx proxy_pass 0ee91c2
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 12 additions and 1 deletion. Show diff stats Hide diff stats

  1. 13  templates/jenkins.conf.erb
13  templates/jenkins.conf.erb
... ...
@@ -1,4 +1,4 @@
1  
-upstream jenkins.dev {
  1
+upstream jenkins {
2 2
   server 127.0.0.1:<%= scope.lookupvar "jenkins::config::port" %> fail_timeout=0;
3 3
 }
4 4
 
@@ -17,4 +17,15 @@ server {
17 17
     break;
18 18
   }
19 19
 
  20
+  location / {
  21
+    proxy_buffering          off;
  22
+    proxy_max_temp_file_size 0;
  23
+    proxy_redirect           off;
  24
+
  25
+    proxy_set_header         X-Real-IP  $remote_addr;
  26
+    proxy_set_header         X-Forwarded-For $proxy_add_x_forwarded_for;
  27
+    proxy_set_header         Host $http_host;
  28
+
  29
+    proxy_pass   http://jenkins;
  30
+  }
20 31
 }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.