Skip to content

Commit 2d1ade3

Browse files
Update Caddy reverse-proxy instructions (#11655)
Co-authored-by: techknowlogick <[email protected]>
1 parent 9d65200 commit 2d1ade3

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/content/doc/usage/reverse-proxies.en-us.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,15 @@ If you want Caddy to serve your Gitea instance, you can add the following server
159159

160160
```
161161
git.example.com {
162-
proxy / http://localhost:3000
162+
reverse_proxy localhost:3000
163+
}
164+
```
165+
166+
If you still use Caddy v1, use:
167+
168+
```
169+
git.example.com {
170+
proxy / localhost:3000
163171
}
164172
```
165173

@@ -169,7 +177,18 @@ In case you already have a site, and you want Gitea to share the domain name, yo
169177

170178
```
171179
git.example.com {
172-
proxy /git/ http://localhost:3000 # Note: Trailing Slash after /git/
180+
route /git/* {
181+
uri strip_prefix /git
182+
reverse_proxy localhost:3000
183+
}
184+
}
185+
```
186+
187+
Or, for Caddy v1:
188+
189+
```
190+
git.example.com {
191+
proxy /git/ localhost:3000
173192
}
174193
```
175194

0 commit comments

Comments
 (0)