Hi All!

I'm having a problem setting up an existing webapp from Apache 2.2/Tomcat6 on a 
new server running Centos 7, and the following packages:

httpd   2.4.6-45.el7.centos.4
tomcat.noarch                        7.0.69-11.el7_3                 @updates   
tomcat-native.x86_64                 1.1.34-1.el7                    @epel      

For debugging I have enabled AJP/1.3 and 8009 and HTTP on 8080, then use Apache 
to ProxyPass.

With my initial configuration, data from a form POST is not available via 
request.getParameter:

  ProxyPass / ajp://localhost:8009/ <ajp://localhost:8009/> retry=1 
acquire=3000 timeout=600 Keepalive=On
  ProxyPassReverse / ajp://localhost:8009/ <ajp://localhost:8009/>

But changing it to this fixes everything:

  ProxyPass / http://localhost:8080/ <http://localhost:8080/> retry=1 
acquire=3000 timeout=600 Keepalive=On
  ProxyPassReverse / http://localhost:8080/ <http://localhost:8080/>

In the broken instance, request.getParameter("x") returned null, but 
request.getReader() returned bytes with "x=123" so seems that Apache is sending 
the POST body but Tomcat is not processing it correctly, yes?

Please also see 
https://stackoverflow.com/questions/44167876/problems-with-post-parameters-with-tomcat-ajp-on-apache-2-4-but-not-2-2
 
<https://stackoverflow.com/questions/44167876/problems-with-post-parameters-with-tomcat-ajp-on-apache-2-4-but-not-2-2>
 for my steps so far.

I would prefer to switch back to AJP for the proxy, since I understand it is 
more performant, right? Should I try forcing a Tomcat 8 install to see if the 
problem persists there too?

Best,
Nic.

Reply via email to