You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alessandro Staltari <ml...@studiobalbi.it> on 2001/12/28 15:32:37 UTC
Trailing slash redirect weirdness
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: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>