I’m trying to use basicauth to authenticate before loading my php application.
Here are the relevant lines from the Caddyfile:
basicauth / user pass
fastcgi / localhost:9000 php
rewrite {
if {path} ends_with /
to {dir}/index.html {dir}/index.php /_h5ai/public/index.php
}
But when I request a page, it simply loads, same as if I removed the basicauth line. basicauth works as expected if I take out the fastcgi and rewrite directives.
How do I configure these two features to work together?