I have both Apache and Wildfly installed on a Ubuntu 14.04 system. Now I'd like to make Wildfly (locally http://localhost:8080) accessible from Apache (http://webserver/wildfly). How would I have to do that?

Sofar, I've enabled the two mods: proxy and proxy_http. And I've added at the end of the document /etc/apache2/apache2.conf:

ProxyRequests off
ProxyPass /wildfly/ http://localhost:8080/
ProxyPassReverse /wildfly/ http://localhost:8080/


Now half of it works, but the paths are not transformed right. The path to one of my apps running on Wildfly is:


But all links on its page are processed like this:


rather than this:


If I run Wildfly locally, everything works fine. This lets me believe that there must be an error in the Apache Reverse Proxy configuration. Is that right? What must I do to have Apache parse the right addresses / links?

  • What says netstat -anp | grep 8080 ?
    – krisFR
    Jun 14, 2015 at 23:47
  • tcp 0 0* LISTEN 1083/java
    – Socrates
    Jun 15, 2015 at 0:19
  • have you tried accessing wildfly using the URL http://localhost/wildfly/? Mind the trailing slash! Jun 15, 2015 at 6:32
  • I have edited the above question. Plz take a look.
    – Socrates
    Jun 21, 2015 at 18:24

1 Answer 1


I hope that you solved your problem, but in case that there is someone else who my need an answer for this question here is the solution,

For web applications that are deployed outside an EAR file (WAR deployment)

In the web-inf folder


add a jboss-web.xml file with this content where / is the root deployment if you would like to deploy it as a root for your case just change the "/" whit "testproj".


EAR file

From the official documentation (please check the reference) you can find that inside the EAR file, the context root is defined in the application.xml file. in the following example the context root of the web-client.war is bank, so the application is set to /bank which mean that the URL will be www.domaine.com/bank


reference : Jboss Doc - Chapter 6. Setting the context root of a web application

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.