Working: Caddy v2 as a reverse proxy for Liferay

Liferay 7.4 is a Java portal (excellent). It runs on top of Tomcat, but all the posts I found about Caddy did not work. The problem turned out to be with missing settings on Liferay, not Caddy.

The Caddyfile I use looks like this:

staff.dasko.org {
        encode gzip
        reverse_proxy localhost:8080
        log {
                output file /var/log/caddy/staff.log
        }
}

With only this setting, Firefox complained of mixed content (http & https).
I solved the problem by adding these lines to the Liferay setup file portal-ext.properties:

web.server.http.port=80
web.server.https.port=443
web.server.protocol=https

That was it!
Thank you Caddy developers for an excellent and easy to use product!

I hope this article helps other Liferay-ers!

1 Like

Great, thank you for sharing so that others can find your solution! I’ve made your post a wiki since it’s more of a reference item than a help topic.

This topic was automatically closed after 30 days. New replies are no longer allowed.