Wildfly and subdomains

Hello :slight_smile:
I’ld like to apologize for my poor english :confused:
I’m a new Caddy’s user, and I would like to use it for local development of legacy projects based on Java Struts 1.
I have 2 apps running on Wildfly server : localhost:8080/app1 and localhost:8080/app2
Is it possible to use 2 different subdomains like this ?

app.mydomain.com ->  localhost:8080/app1
otherapp.mydomain.com -> localhost:8080/app2

And, if it is, how could I do it ? Maybe a link to some doc to give me a way ?

Thanks a lot

It would just be this:

app.mydomain.com {
	rewrite * /app1{uri}
	reverse_proxy localhost:8080
}

otherapp.mydomain.com {
	rewrite * /app2{uri}
	reverse_proxy localhost:8080
}

Thank you very much for your quick reply,
I think the projects have some kind of strange redirections after OAuth login. :confused:
However, I can use them one by one setting the context-root to / and remove Caddy rewrites.
Thanks :slight_smile:

1 Like

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