diff options
| author | Arseney300 <Arseney300@gmail.com> | 2026-02-21 03:31:17 +0700 |
|---|---|---|
| committer | Arseney300 <Arseney300@gmail.com> | 2026-02-21 03:31:17 +0700 |
| commit | 201045912d00b33ecb1d9cc0897579d45996db16 (patch) | |
| tree | 136c43d847258dda67711a0c12495c97a5ce2b2b | |
| parent | 0ae91a9cbcc66912fe8b0abe2a33344839b4125a (diff) | |
Fix jenkins.swave.lol 404 by proxying through /jenkins prefix
Jenkins requires --prefix=/jenkins for path-based access on swave.lol.
Redirect subdomain root to /jenkins/ and proxy the prefix path to
Jenkins, avoiding double-prefix redirect loops.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| -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; |
