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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to