I got it,thank you very much。


chenk...@126.com
?From:?André WarnierDate:?2015-04-28?16:46To:?Tomcat Users ListSubject:?Re: how 
to convert https to http by using mod_jkchenk818 wrote:
> 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?
?
Take a look at the standard Tomcat server.xml configuration file.
There are 3 <Connector> defined there (2 are commented-out).? Each of these 
Connectors 
accepts connections (and requests) for one protocol.
It is the client which chooses to which port (<Connector>) it connects.
?
In a configuration like
?
browser <- HTTP -> Apache httpd + mod_jk <- AJP -> Tomcat AJP Connector <-> 
Tomcat webapp
?
the Tomcat client is "Apache httpd + mod_jk".
It is thus "Apache httpd + mod_jk" which chooses to which port of Tomcat it 
connects (by 
default, 8009), and which protocol it uses (in this case, always AJP).
(Look at the settings for mod_jk, in Apache).
?
In a configuration like
?
browser <- HTTP/HTTPS -> Apache httpd + mod_proxy_ajp <- AJP -> Tomcat AJP 
Connector <-> 
Tomcat webapp
?
the Tomcat client is "Apache httpd + mod_proxy_ajp".
It is thus "Apache httpd + mod_proxy_ajp" which chooses to which port of Tomcat 
it 
connects (by default, 8009), and which protocol it uses (in this case also, 
always AJP).
(Look at the settings for mod_proxy_ajp, in Apache).
?
Imagine this analogy :
?
There is a company in Germany which makes motorbikes and sells them to clients 
in the 
whole world.? The factory is in Germany, and there are the workers making the 
motorbikes. 
The workers speak only German.
?
For international clients to call, there are 3 telephone numbers :
- on telephone number "8080", there is a lady speaking English and German
- on telephone number "8443", there is a lady speaking Chinese and German
- on telephone number "8009", there is a lady speaking Italian and German
?
Each of these ladies can take a call in the language that she knows, and 
translate the 
customer wishes to German, for the factory workers.
?
If a Chinese client calls on number 8009, the lady there will not understand 
what he says, 
and he will get no motorbike.? But if he calls the number 8443, the lady will 
understand 
him; she will relay his order properly to the factory, in German; and the 
client will get 
his motorbike.
?
The factory is Tomcat; the factory workers are the webapps; the ladies are the 
<Connector>'s; the Connector ladies translate the customer calls from their 
language 
(HTTP, HTTPS or AJP) into a HttpServletRequest that the webapps understand.
The factory workers do not need to speak English (HTTP), Chinese (HTTPS) or 
Italian (AJP), 
because they always get the requests in German (HttpServletRequest), as 
translated by the 
appropriate Connector.
?
?
?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
?

Reply via email to