Here is my Caddyfile:
aruiplex.com {
encode gzip
file_server /files/* {
root /files
browse
}
reverse_proxy /api/* localhost:7022
file_server {
root /srv
}
}
Here is my plan:
When request URL is
aruiplex.com, Caddy can show me theindex.htmlin/srvdirectory.When request URL is
aruiplex.com/files, Caddy can show me the file list in the/filesdirectory in docker container.When request URL is
aruiplex.com/api, Caddy can pass this request tolocalhost:7022.
But when I request aruiplex.com/files file server is not working, it gives me a 404. And I have check this directory in docker container, there have some files.
Here is my file tree at / in docker container:
/
/home
/etc
/...
/files
/aaa.txt
/bbb.txt
/srv
/index.html
Version: Caddy 2.4.6 in Docker.
P.S.: If you see the post on the caddy.community, it also me.