Hello. I am trying to move some sites from Nginx to Caddy for a testing server and I am struggling with the following statement in nginx.
location ~ ^/([a-z0-9-]+)/(.+)$ {
proxy_pass https://127.0.0.1/$2;
proxy_set_header Host $1.testing.env;
expires max;
}
I started with something like this but I am unsure as to how to continue
proxy / http://127.0.0.1/ {
header_upstream Host notsure.testing.env
}
This issue seems related on Github but I am hoping I can solve this with rewrites https://github.com/mholt/caddy/issues/1539