diff options
Diffstat (limited to 'nginx/nginx.conf')
| -rw-r--r-- | nginx/nginx.conf | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 9afed4f..ea83fd1 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -121,8 +121,14 @@ server { charset utf-8; - location / { - proxy_pass http://jenkins:8080; + # Jenkins requires --prefix=/jenkins, so all URLs must go through /jenkins + # Redirect root to /jenkins, then proxy /jenkins to Jenkins + location = / { + return 302 https://$host/jenkins/; + } + + location /jenkins { + proxy_pass http://jenkins:8080/jenkins; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
