Skip to content

Commit fd525df

Browse files
committed
Update Caddy reverse proxy config to exclude root path for static files
1 parent 9e97ad3 commit fd525df

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

docs/best-practices/deployment.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,17 +467,18 @@ achieved by using a `Caddyfile` configuration with the following contents:
467467

468468
```
469469
example.com {
470-
root * /var/www/html/public;
470+
root * /var/www/html/public
471471
472472
@static {
473473
file {path} {path}/
474-
not path *.php
474+
not path / *.php
475475
}
476+
476477
handle @static {
477478
rewrite * {http.matchers.file.relative}
478479
file_server
479480
}
480-
481+
481482
handle {
482483
reverse_proxy localhost:8080
483484
}

0 commit comments

Comments
 (0)