how to convert https to http by using mod_jk

2015-04-27 Thread chenk...@126.com






hi:? ??? ? I'm using apache + tomcat to build my website。The tomcat ?provide 
http service and apache provide both http/https。I tried two method to 
implements:
by mod_proxy:ProxyPass / balancer://mycluster/ stickysession=JSESSIONID 
nofailover=On?
ProxyPassReverse / balancer://mycluster/?
Proxy balancer://mycluster?
BalancerMember http://127.0.0.1:8080 route=tomcat1?
BalancerMember http://127.0.0.1:8081 route=tomcat2?
/Proxy
by mod_jk:I didn't know how to convet https to http like mod_proxy


chenk...@126.com



Re: how to convert https to http by using mod_jk

2015-04-27 Thread André Warnier
chenk...@126.com wrote:
 
 
 
 
 
 hi:? ??? ? I'm using apache + tomcat to build my website。The tomcat ?provide 
 http service and apache provide both http/https。I tried two method to 
 implements:
 by mod_proxy:ProxyPass / balancer://mycluster/ stickysession=JSESSIONID 
 nofailover=On?
 ProxyPassReverse / balancer://mycluster/?
 Proxy balancer://mycluster?
 BalancerMember http://127.0.0.1:8080 route=tomcat1?
 BalancerMember http://127.0.0.1:8081 route=tomcat2?
 /Proxy
 by mod_jk:I didn't know how to convet https to http like mod_proxy
 

Hi.
Your email format is a bit bizarre.  Try to set up your email program to send 
emails to
the list as plain text.

About your question, here are some semi-graphic explanations about how you can 
connect
Apache httpd to Tomcat. There are many ways. - xxx - indicates the protocol 
used.

configuration 1 : using mod_proxy_http and simple HTTP all the way :

browser - HTTP - Apache httpd + mod_proxy_http - HTTP - Tomcat HTTP 
Connector -
Tomcat webapp


configuration 2 : using mod_proxy_http and HTTPS from browser :

browser - HTTPS - Apache httpd + mod_proxy_http - HTTP - Tomcat HTTP 
Connector -
Tomcat webapp


configuration 3 : using mod_proxy_http and HTTPS all the way :

browser - HTTPS - Apache httpd + mod_proxy_http - HTTPS - Tomcat HTTPS 
Connector -
Tomcat webapp

(Note : this is quite inefficient if Apache httpd and Tomcat are on the same 
host (or
connected via a secure link), because all data gets encrypted/decrypted 
multiple times)


configuration 4 : using mod_proxy_ajp :

browser - HTTP - Apache httpd + mod_proxy_ajp - AJP - Tomcat AJP Connector 
- Tomcat
webapp

configuration 5 : HTTPS variant of using mod_proxy_ajp :

browser - HTTPS - Apache httpd + mod_proxy_ajp - AJP - Tomcat AJP Connector 
- Tomcat
webapp


configuration 6 : using mod_jk :

browser - HTTP - Apache httpd + mod_jk - AJP - Tomcat AJP Connector - 
Tomcat webapp


configuration 7 : HTTPS variant of using mod_jk :

browser - HTTPS - Apache httpd + mod_jk - AJP - Tomcat AJP Connector - 
Tomcat webapp


AJP is a protocol that is not the same as HTTP/HTTPS. But it transports the same
information as HTTP/HTTPS, and for the Tomcat webapp (and the browser) it is 
the same.

The setups of mod_jk and mod_proxy_ajp are different, but they offer generally 
comparable
options.  Choosing one or the other is generally a question of personal 
preference, or of
availability on any given OS platform.

There is no secure variant of the AJP protocol (iow there is no AJPS e.g.).
This does not really matter if the connection between Apache httpd and Tomcat 
in inside
the same host, or (in many cases) if the connection between Apache httpd and 
Tomcat
happens over your local LAN, and you are not concerned by men-in-the-middle 
there.

In configurations 2, 5 and 7, only the part browser -- Apache httpd is under 
HTTPS.
That is generally called terminating HTTPS at the Apache httpd level.
But in all cases, if Tomcat needs to know some details about the browser HTTPS 
connection,
it can get them, because the connector modules can forward that information via 
HTTP
headers (or AJP attributes).





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: how to convert https to http by using mod_jk

2015-04-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

chenk,

On 4/27/15 5:52 AM, chenk...@126.com wrote:
 hi:? ??? ? I'm using apache + tomcat to build my website。The tomcat
 ?provide http service and apache provide both http/https。I tried
 two method to implements: by mod_proxy:ProxyPass /
 balancer://mycluster/ stickysession=JSESSIONID nofailover=On? 
 ProxyPassReverse / balancer://mycluster/? Proxy
 balancer://mycluster? BalancerMember http://127.0.0.1:8080
 route=tomcat1? BalancerMember http://127.0.0.1:8081 route=tomcat2? 
 /Proxy by mod_jk:I didn't know how to convet https to http like
 mod_proxy

mod_jk always uses AJP which is neither HTTP nor HTTPS. It is not
encrypted unless you make special arrangements to tunnel it through an
encrypted protocol.

Note that you can use AJP without switching to mod_jk:

ProxyPassReverse / balancer://mycluster/?
Proxy balancer://mycluster?
  BalancerMember ajp://127.0.0.1:8080 route=tomcat1?
  BalancerMember ajp://127.0.0.1:8081 route=tomcat2?
/Proxy

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVPkd+AAoJEBzwKT+lPKRY+6gP/2GGkOh9CooxpvgpiUIm5LwU
2YbrMVmI3uwwy3MezFMODyVQ84LuX5HTvYwCJb43JSz1z434RVYWH6+kJqIWblih
SR92eqmGluIWe3Ev9laRwwkvixFMcIl+hABBmPYr9iDEI45wLmAZequ2cO2+HWdQ
PwcwVFBIZwaDZPrEJAE1w8zZaJgDVenz2NImNWpfVW3Sdayyb46BRS+X+PdIyfTF
VkvR7v3bqb4BAMgWkPkyIZA1Ss07LmWBNDY+4+VTbpkXTJdvO1qM6NcWUI3DSvkr
X6Ld91+LoKW5Da5e0Z6aypWKYbaXh7aMJd5eqA468Oi2r67e43qGq8WbzypF2Q+2
zacnJ/rbPQ6jawnC+6k2ccySAsvjgWjDHCIMNPkNQBbtZ86q4CtSQcrRocQlGSKf
K13wr6D8kEzFjnmzMf9FtzQ9YruAfzilZ3cy4/k9E+70h46sSRNhjwZz83mzDuGs
TyXaN1lVu+r76Ihb4AHh74Ir9XlLnv82CEMpQpmWz5abFurDIZZ3aXVqMLMIV03k
yvxXjkTbv3hul/aA7c8IORlqC5tm7/Jzuv2O3PEEm3FS30LMEwuKINkkiPFQBn1u
6i1FGZhMhHmAUxaVfOKiQz2EMp2ctxTbg2B+ZoH46CXdsN0N3bvjs8hAJ5A4r3v5
jaR2J1HDS+Nou7edfpPu
=xSHb
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re:Re: how to convert https to http by using mod_jk

2015-04-27 Thread chenk818
Hi Warnier: Thank you for your reply。I always thought there was AJPs,now I 
understood。 but there's another question: In configuration 7, if the backend 
tomcat provide both http and https,which protocal will be used?Is it determined 
by httpd's protocol?