nginx -> httpd -> mod_jk -> tomcat

Giacomo Arru - BETA Technologies giacomo at beta.srl
Mon Jul 30 10:44:48 UTC 2018


Hi Aleksandar, thank you for your reply. 


> For which particular feature do you need ajp? 
> I have used several tomcats with httpd with ajp but after some horrible 
> errors we switched to http connector. 

We wanted to use HTTP Connector, and set it up. But we couldn't manage to make the app work correctly: we coudn't upload files > 60k and tweaking nginx and tomcat configuration wouldn't help. We were unable to debug the problem. With AJP connector, all features work fine. The app is developed with Vaadin 8. 
We have no static files in our app because they already are served with a CDN. 

We would like test nginx with AJP connector (if somehow supported!). 

client_max_body_size is set to 128m 

so I think the problem occurs at http level while uploading files but I can't manage to debug my system. 






Giacomo 



Da: "Aleksandar Lazic" <al-nginx at none.at> 
A: "nginx" <nginx at nginx.org> 
Inviato: Sabato, 28 luglio 2018 18:41:59 
Oggetto: Re: nginx -> httpd -> mod_jk -> tomcat 

Hi. 

On 26/07/2018 10:06, Giacomo Arru - BETA Technologies wrote: 
>Hi everybody, 
> 
>I recently begun using proxy with nginx (same tests were made with 
>haproxy). 

Which one do you prefer as both are very good and have similar features. 

>My needs are to proxy for failover and balancing tomcat: I need to 
>serve lots of users with production app. 
> 
>While I understood that a 100% tomcat AJP1.3 compatibility is 
>achievable with apache httpd only and mod_jk, I successfully serve my 
>app with apache to a simple 80 http port (cookie path already 
>patched). So I decided to have a localhost apache httpd to proxy tomcat 
>with AJP. IT works perfectly. 

For which particular feature do you need ajp? 
I have used several tomcats with httpd with ajp but after some horrible 
errors we switched to http connector. 
https://tomcat.apache.org/tomcat-9.0-doc/config/http.html 

In case you don't need a special feature in httpd this makes also 
possible to reduce the complexity of your chain ;-) 

nginx (http/https/server static files) -> tomcat 

>Now, I need to proxy httpd with nginx, adding SSL with letsencrypt. I 
>successfuly configured the proxy and everything works but uploads: if I 
>send a file to my app, only small uploads work. 
> 
>I'd like to investigate the headers, maybe I need to transform some 
>string but I'm a completely newbie from this point of view. 
> 
>Do you have some tips on how to investigate the problem? 

With small you mean ~1M, that's the default setup for 

client_max_body_size 
https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size 

>Thanks, 
> 
>Giacomo Arru 

Best regards 
Aleks 
_______________________________________________ 
nginx mailing list 
nginx at nginx.org 
http://mailman.nginx.org/mailman/listinfo/nginx 

-- 
Questo messaggio stato analizzato con Libra ESVA ed risultato non infetto. 
Seguire il link qui sotto per segnalarlo come spam: 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180730/1d2cd521/attachment.html>


More information about the nginx mailing list