Problem with Apache 2.4, Tomcat 7 and jk_mod

0

I have a server with the following configuration: Apache 2.4.29 (64bits) + mod_jk 1.2.42 + Tomcat 7.0.82 (with a struts application)

The problem is that although the connection between the Apache and the Tomcat works well, when submitting a form, the data does not reach the Tomcat server.
The struts application returns error of required fields .

It is as if the POST request did not carry the values of the form. The rest of the web application works perfectly, and the logs do not show any warning or any error. And if I stop the Apache and directly access the Tomcat, everything works fine. Any ideas?

link

<IfModule jk_module>
JkWorkersFile "E:\platj2ee\Apache24\conf\workers.properties"
JkLogFile "E:\platafj2ee\Apache24\logs\mod_jk.log"
JkLogLevel debug
JkOptions +ForwardSSLCertChain
</IfModule>


JkMount /* rrr

workers.properties:

worker.list=rrr
worker.cta.port=8009
worker.cta.host=localhost
worker.cta.type=ajp13

server.xml:

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" 
           enableLookups="false" redirectPort="8443" protocol="AJP/1.3" connectionTimeout="60000"
            maxPostSize="0" URIEncoding="UTF-8"/>
    
asked by fhr 26.12.2017 в 15:43
source

1 answer

0

The problem was with the configuration of the AJP 1.3 that dragged from a Tomcat 5.5
(Therefore, it fails with mod_jk as well as with mod_proxy_ajp.)

The server.xml had the parameter MaxPostSize="0":

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" 
           enableLookups="false" redirectPort="8443" protocol="AJP/1.3" connectionTimeout="60000"
            maxPostSize="0" URIEncoding="UTF-8"/>

In the Tomcat 5.5 documentation they indicated that to disable the maximum number of bytes per POST request, the value should be 0 or less than 0.
Well, in the Tomcat 7 documentation, to disable maxPostSize, the value must be less than 0 .

In case anyone is in this problem, you should also check the timeout values.

    
answered by 27.12.2017 в 11:00