1. The problem I’m having:
Given a folder with 2 subfolders in it called /site_1 and /site_2 each being a static HTML page respectively.
folder
- site_1
- site_2
I want to be able to access site_1 when a request is made to http://localhost:3000/
and I want to show site_2 when a request is made it http://localhost:3000/admin
.
I am able to access site_1 over http://localhost:3000/
, however I am not able to access site_2 on http://localhost:3000/admin
.
2. Error messages and/or full log output:
None
3. Caddy version:
4. How I installed and ran Caddy:
RUN apk add caddy
a. System environment:
Docker
b. Command:
caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
c. Service/unit/compose file:
d. My complete Caddy config:
:3000 {
root * /site/selfhost-web
file_server
handle_path /admin* {
root * /site/sh-admin
file_server
}
handle_path /backend* {
reverse_proxy localhost:3170
}
}