tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alessandro Staltari" <mlu...@studiobalbi.it>
Subject Trailing slash redirect weirdness
Date Fri, 28 Dec 2001 14:32:37 GMT
It seems Tomcat always redirect trailing slash requests towards http
protocol on port 80 even if it was submitted through https.

The full story:

I'm using Tomcat 4.0.1 behind Apache through proxy connector. I want to use
both http and https access to my application, so I let Apache to handle SSL
and proxy requests to Tomcat in http.

To obtain my goal I defined two connectors in server.xml with different
port, proxyport and scheme values:

<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8081" minProcessors="5" maxProcessors="75"
enableLookups="false"
acceptCount="10" debug="0" connectionTimeout="60000"
proxyName="www.myserver.it"
proxyPort="80" scheme="http" />

<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8083" minProcessors="5" maxProcessors="75"
enableLookups="false"
acceptCount="10" debug="0" connectionTimeout="60000"
proxyName="www.myserver.it"
proxyPort="443" scheme="https" />

Then I added proxy directives for virtual server on port 80 (http)

ProxyPass /wps http://www.myserver.it:8081/wps
ProxyPassReverse /wps http://www.myserver.it:8081/wps

and the proxy directives for virtual server on port 443 (https)

ProxyPass /wps http://www.myserver.it:8083/wps
ProxyPassReverse /wps http://www.myserver.it:8083/wps

All was going fine until I tried an url requiring thailing slash redirect,
that, surprisingly, caused an https request to be redirected to the http
server instead of the https one.

After a lot of tryes, I reaches a working configuration.
To make it work I had to use http proxy connector only and I had to proxy
Apache https requests through Apache http server and then to Tomcat's http
proxy connector.

So I used proxy directives for virtual server on port 80 (http)

ProxyPass /wps http://www.myserver.it:8081/wps
ProxyPassReverse /wps http://www.myserver.it:8081/wps

and the proxy directives for virtual server on port 443 (https)


ProxyPass /wps http://www.myserver.it/wps
ProxyPassReverse /wps http://www.myserver.it/wps

I didn't really understand yet why this works and why other solutions
didn't, if someone can enlighten me I would really appreciate.

Regards,

Alessandro Staltari.


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message