1

We are using wildfly 8 and 9 in standalone mode to deploy our applications. In front of the wildfly there is a shared apache reverse proxy. The proxy maps /test/ to one wildfly and /test2/ to another system. Our application is using JSF which makes it necessary for it to "know" the context path. Therefore we have to create different deployment artifacts for the different wildfly instances now, because the application.xml has to define the context-root either as /test/ or /test2/

I was wondering now if it is possible to override the context-root from the appplication.xml in the wildfly configuration. E.g. our context-rot in the application.xml could be / for all environments while wildfly prepends it with either /test/ or /test2/ depending on the instance. Is this possible somehow?

1 Answer 1

0

You can add the parameter -Djboss.socket.binding.port-offset=<value> to your JVM_OPT. With this you'll not use the Standard Port 8080 but 8080+value

As an example:

  • application.xml context path is set to /
  • application 1 has -Djboss.socket.binding.port-offset=0
  • application 2 has -Djboss.socket.binding.port-offset=100

Result:

application 1: http://localhost:8080/

application 2: http://localhost:8180/

1
  • Unfortunately this won't help. I have to be able to map different "subfolders" on the apache to the wildfly instances. To make this work the context path has to be different on each of them. It's a JSF issue: path on the reverse proxy and the server that is behind the proxy has to be the same various things will break. (There is also a fix for the JSF side of this problem, but I'd like to avoid changes there)
    – Nitek
    Oct 8, 2015 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .