Mark, > > On 5/31/2017 5:42 AM, Nicholas Cottrell wrote: >> 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. >> > > I wasn't aware that mod_proxy_ajp was available on a stock CentOS 7 even > with epel enabled. > > If you're using the ajp protocol (it's not HTTP), then you'll need to > get mod_jk (from tomcat.apache.org) and build it yourself. It's not > difficult. > > However, the configuration is quite a bit different. Fortunately, there > is an excellent set of example configuration files in the source (see > the conf subdirectory). > > mod_proxy_ajp.so was shipped with CentOS 6, but does not appear to be > available with CentOS 7. > > Either that - or go with mod_proxy_http and proxy to the HTTP connector > (default in server.xml is port 8080). > > . . . just my two cents > /mde/
Yes, seems that Centos 7 does provide mod_proxy_ajp.so: [root@blanche nic]# yum provides /usr/lib64/httpd/modules/mod_proxy_ajp.so Loaded plugins: etckeeper, fastestmirror, priorities, protectbase Loading mirror speeds from cached hostfile * base: mirror.wiuwiu.de * epel: mirrors.n-ix.net * extras: mirror.softaculous.com * remi: mirror.23media.de * remi-php56: mirror.23media.de * remi-safe: mirror.23media.de * updates: mirror.wiuwiu.de 0 packages excluded due to repository protections httpd-2.4.6-45.el7.centos.x86_64 : Apache HTTP Server Repo : base Matched from: Filename : /usr/lib64/httpd/modules/mod_proxy_ajp.so httpd-2.4.6-45.el7.centos.4.x86_64 : Apache HTTP Server Repo : updates Matched from: Filename : /usr/lib64/httpd/modules/mod_proxy_ajp.so httpd-2.4.6-45.el7.centos.4.x86_64 : Apache HTTP Server Repo : @updates Matched from: Filename : /usr/lib64/httpd/modules/mod_proxy_ajp.so Is mod_jk really still recommended? I thought it was mostly deprecated now in preference for mod_proxy_ajp? See https://serverfault.com/questions/182289/mod-proxy-vs-mod-proxy-ajp-vs-mod-jk <https://serverfault.com/questions/182289/mod-proxy-vs-mod-proxy-ajp-vs-mod-jk>