Last active
June 1, 2023 14:17
-
-
Save michabbb/1d47dbbed0f66ba363bfa6dbac7dde55 to your computer and use it in GitHub Desktop.
rewrite /v1/.... to /api/httpsms/v1/.....
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
auto_https off | |
debug | |
} | |
:80 { | |
root * /app/public | |
encode zstd gzip | |
file_server | |
vars /v1/* my-path /api/httpsms{path} | |
vars my-path {path} | |
php_fastcgi phpfpm:9000 { | |
env REQUEST_URI {vars.my-path} | |
} | |
log { | |
# output logs to standard error (console) | |
output stderr | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://macropage.medium.com/a-story-about-caddy-nginx-and-some-laravel-routing-258948a56c28
https://caddyserver.com/docs/caddyfile/directives/vars