You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Giovanni Cuccu <gc...@dianoema.it> on 2002/09/10 09:10:26 UTC

Re: Configuring tomcat 4.1.10 for working with both http and https

At 18:19 09/09/2002 +0200, you wrote:
I found that if I use the old connector (JK) all works well. It seems like 
the jk2 connector (which is much faster than its predecessor) still need 
some testing before going really usable.
Giovanni
>Hi all,
>         I have just downloaded tomcat 4.1.10 and replaced tomcat 4.0.4
>in the previous version I had a site working with both http and https.
>Now I switched to the jk2 connector and I have this problem
>the jk2 connector can't works with https and  http together.
>In the server.xml i had to put the attribute scheme to https in order to 
>work with https but if I try to get the same site with http I get the fist 
>manually digited page in http but if I submit a form with a relative url 
>(/context/servlet) as a target the response switches over https
>here is a scheme
>jsp page---(submit to a servlet)-->servlet(redirecting with relative 
>url)--->other jsp page
>http------------------------------------>http------------------------------------------>https 
>(switch made automatically)
>the same happens if the scheme is set to http and I'd like to see the site 
>in https mode (in this case the switch is from htts to http)
>can I avoid this situation?
>In tomcat 4.0.4 all worked as I expected.
>here is my tomcat 4.1.10 server.xml
>...
>  <Service name="Tomcat-ApacheSSL">
>
>     <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
>      port="8009" minProcessors="5" maxProcessors="75"
>      enableLookups="true" appBase="webapps" scheme="https"
>      acceptCount="10" debug="0" 
> protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" />
>
>     <Engine className="org.apache.catalina.core.StandardEngine"
>      name="Apache" debug="0" defaultHost="giovanni">
>          <Host name="giovanni" debug="0" appBase="webapps" unpackWARs="true">
>             <Listener 
> className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" />
>          </Host>
>          <!-- Global logger unless overridden at lower levels -->
>          <Logger className="org.apache.catalina.logger.FileLogger"
>               prefix="apache_log." suffix=".txt"
>               timestamp="true"/>
>
>     </Engine>
>
>   </Service>
>...
>and here is the tomcat 4.0.4 one
>
>   <Service name="Tomcat-Apache">
>
>     <!-- Define an AJP 1.3 Connector on port 8009 -->
>     <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
>                port="8009" minProcessors="5" maxProcessors="75"
>                acceptCount="10" debug="0" secure="true" />
>
>     <!--<Connector 
> className="org.apache.catalina.connector.warp.WarpConnector"
>      port="8008" minProcessors="5" maxProcessors="75"
>      enableLookups="true" appBase="webapps"
>      acceptCount="10" debug="0"/>-->
>
>     <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
>     <Engine className="org.apache.catalina.core.StandardEngine"
>      name="Apache" debug="0">
>          <Host name="giovanni" debug="0" appBase="webapps" unpackWARs="true">
>             <Listener 
> className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" />
>             <!--<Context path="/Portal" docBase="Portal"  debug="0" />-->
>          </Host>
>       <!-- Global logger unless overridden at lower levels -->
>       <Logger className="org.apache.catalina.logger.FileLogger"
>               prefix="apache_log." suffix=".txt"
>               timestamp="true"/>
>
>       <!-- Because this Realm is here, an instance will be shared 
> globally -->
>       <Realm className="org.apache.catalina.realm.MemoryRealm" />
>
>     </Engine>
>
>   </Service>
>
>thanks in advance,
>Giovanni
>
>
>----------------------------------------
>Giovanni Cuccu
>Sw Engineer@dianoema.it
>Dianoema S.p.A.
>Via de' Carracci 93 40131 Bologna
>Tel: 051-4193911
>e-mail:gcuccu@dianoema.it
>----------------------------------------
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>


----------------------------------------
Giovanni Cuccu
Sw Engineer@dianoema.it
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:gcuccu@dianoema.it
----------------------------------------




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>