1. Caddy version (caddy version
): V2
2. How I run Caddy: Caddy maintains a set of images which can be run with docker. We are using latest image from Docker Hub. We use a Caddyfile.
a. System environment: Docker running on Openshift
b. Command:
paste command here
c. Service/unit/compose file:
paste full file contents here
d. My complete Caddyfile or JSON config:
:4000 {
for app
root * /opt/app-root/src
reverse_proxy /parul/* https://google.com {
header_up Host {http.reverse_proxy.upstream.host}
header_up Sec-WebSocket-Protocol {>Sec-WebSocket-Protocol}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
flush_interval -1
}
route /marketplace/* {
uri strip_prefix /marketplace
reverse_proxy https://app-digmkt-prod.apps.silver.devops.gov.bc.ca {
header_up Host {http.reverse_proxy.upstream.host}
header_up Sec-WebSocket-Protocol {>Sec-WebSocket-Protocol}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
flush_interval -1
}
respond /ehlo 200
}
file_server
encode gzip
try_files {path} {path}/ /index.html
log {
output stderr
output stdout
format single_field common_log
level info
}
header / {
# prevent any static html from being cached
Cache-Control “public, max-age=0, must-revalidate”
}
}
3. The problem I’m having:
A route in our website /marketplace/* needs to be served from a different server with our server acting as an proxy.
4. Error messages and/or full log output:
Can’t seem to upload log output because of 4 url limit. I will try to filter out all urls and try again.
5. What I already tried:
I tried running a ton of different variations of this caddy configuration, reading up on caddy documentation and trying out different approaches. Nothing works and logs are inconclusive.