title: Load balancer with apache httpd and wildfly for rest web services with mod_proxy
body: <p>I have an apache load balancer with mod_proxy and wildfly (apache 224 and wildfly 9).</p>
  
  <p>I have 4 servers in domain in wildfly and the load balancer works fine with a "hello world" app, and in the balancer manager i can see how the requests are sent to each server.</p>
  
  <p>The thing is, When I use the app that has some REST web services, i am sending the request with a GET method and some headers for authentication, and somehow, the application is responding with error when i access it through the load balancer, but if I send it directly to the server, it works correctly. </p>
  
  <p>my cofiguration goes as follows</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ProxyRequests Off
  &lt;Proxy balancer://mycluster&gt;
      BalancerMember http://localhost:8080/ loadfactor=25
      BalancerMember http://localhost:8230/ loadfactor=25
      BalancerMember http://localhost:8330/ loadfactor=25
      BalancerMember http://localhost:8430/ loadfactor=25
  &lt;/Proxy&gt;
  &lt;Location /balancer-manager&gt;
      SetHandler balancer-manager
      Order Deny,Allow
      Allow from all
  &lt;/Location&gt; 
  &lt;Location /test&gt;
      Order allow,deny
      Allow from all
  &lt;/Location&gt; 
  ProxyPass /test balancer://mycluster stickysession=JSESSIONID
  </code></pre>
  
  <p></p>
  
  <p>I am testing using postman and sending the requests with a get method and a header for authentication: basic {base64 code} as follows:</p>
  
  <p><a href="http://127.0.0.1/test/myproject.ws/myproject/get_list?key=T11108101191&amp;page=1" rel="nofollow">http://127.0.0.1/test/myproject.ws/myproject/get_list?key=T11108101191&amp;page=1</a></p>
  
  <p>and this results in error.</p>
  
  <p>when i try this:</p>
  
  <p><a href="http://127.0.0.1:8080/myproject.ws/myproject/get_list?key=T11108101191&amp;page=1" rel="nofollow">http://127.0.0.1:8080/myproject.ws/myproject/get_list?key=T11108101191&amp;page=1</a></p>
  
  <p>This goes ok</p>
  
  <p>and when i try the above, but with a post method, it gets the same error as in the load balancer.</p>
  
  <p>Any idea of what am i doing wrong?</p>
  
  <p>PS: I've tried putting  in the WEB-INF/web.xml of the project, but i still get the same error.</p>