We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e97ad3 commit 41b23c4Copy full SHA for 41b23c4
docs/best-practices/deployment.md
@@ -467,20 +467,18 @@ achieved by using a `Caddyfile` configuration with the following contents:
467
468
```
469
example.com {
470
- root * /var/www/html/public;
+ root * /var/www/html/public
471
472
- @static {
473
- file {path} {path}/
474
- not path *.php
475
- }
476
- handle @static {
477
- rewrite * {http.matchers.file.relative}
478
- file_server
479
480
-
481
- handle {
482
- reverse_proxy localhost:8080
483
+ encode gzip
+
+ @static `!path("*.php") && file() && {file_match.type} == "file"`
+ handle @static {
+ file_server
+ }
+ handle {
+ reverse_proxy localhost:8080
484
}
485
486
0 commit comments