Caddy configuration for Plone VHM

I am trying to get Caddy working together with Plone 6 using the following configuration where our Plone is running on http:/ localhost:18080/Plone:

intranet-test.XXXX-XX.de:80  {

	@plone path_regexp plone ^/(.*)$

       handle @plone {
           rewrite @plone /VirtualHostBase/http/localhost:18080/Plone/VirtualHostRoot/{re.plone.1}
           reverse_proxy localhost:18080
      }
}

I see that the first request is correctly fetch but all further requests to assets, JS, CSS are being fetch by the browser on localhost:18080.

the rewrite path for VHM should contain the external domain and port:

/VirtualHostBase/http/<external_domain>:<external_port>/Plone/VirtualHostRoot/

this external domain then gets placed for all absolute_url calls in the templates...

1 Like