tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: redirect request from 8080 to port 80
Date Wed, 15 May 2013 13:24:45 GMT
On 15/05/2013 14:16, André Warnier wrote:
> Ognjen Blagojevic wrote:

>> Iptables will not change the URL. Iptables merely redirects all
>> packets received on port 8080 to port 80. It will not alter the
>> contents of the packets. Therefore, Tomcat will receive your HTTP
>> request as it is sent by your browser -- which means it will contain
>> port 8080 and not port 80. Tomcat processes the requests and logs the
>> port as it is received, and that is 8080.
> 
> Sorry, but that seems dubious to me.
> Tomcat does not really "receive the URL" as sent.  Tomcat (supposedly)
> gets this connection on its port 80, and in principle has no idea that
> the original client connection was to port 8080, no ?

No.

Depending on the client behaviour Tomcat will either see the full URL in
the request line or will see hostname:port in the host header.

Tomcat also knows which actual port the request was received on.

Exactly which of these values gets used where depends on configuration
including:
- proxyHost and proxyPort on the connector
- access log pattern
- remote IP valve

and AJP has different rules.

Mark


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


Mime
View raw message