I. To configure Tomcat to support for https/httpg:

Step I: Install required GSI libraries

1) copy cog-jglobus.jar, log4j-xxx.jar.jar, puretls.jar, cryptix32.jar, cryptix-asn1.jar
   to Tomcat's common/lib directory.

2) copy cog-tomcat.jar to Tomcat's server/lib directory.

Step II. Deploy GSI in Tomcat

Tomcat 4.1.x:
=============

1) Edit Tomcat's conf/server.xml file:

 For httpg:

 a) Add HTTPG Connector in <service> section:

   <!-- Define a GSI HTTPG/1.1 Connector on port 8443 
            Supported parameters include:
            proxy         // proxy file for server to use
              or 
            cert          // server certificate file in PEM format 
            key           // server key file in PEM format

            cacertdir     // directory location containing trusted CA certs
            gridMap       // grid map file used for authorization of users
    -->
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="8443" minProcessors="5" maxProcessors="75"
               enableLookups="true" authenticate="true"
	       acceptCount="10" debug="1" scheme="httpg" secure="true">
      <Factory className="org.globus.tomcat.catalina.net.GSIServerSocketFactory"
               proxy="d:\\certs\x509up_u945"
               cert="d:\\certs\\usercert.pem"
               key="d:\\certs\\userkey.pem"
               cacertdir="d:\\certs\\certs"
	       gridMap="d:\\certs\\gridmap"
               /> 
    </Connector>

 b) Add valve in <engine> section:

    <Valve className="org.globus.tomcat.catalina.valves.CertificatesValve" />

 For https:

 a) Add HTTPS Connector in <service> section:

   <!-- Define a GSI HTTPS/1.1 Connector on port 8443 
            Supported parameters include:
            proxy         // proxy file for server to use
              or 
            cert          // server certificate file in PEM format 
            key           // server key file in PEM format

            cacertdir     // directory location containing trusted CA certs
            encryption (true/false)   // enable/disable encryption
    -->
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="8443" minProcessors="5" maxProcessors="75"
               enableLookups="true" authenticate="true"
	       acceptCount="10" debug="1" scheme="https" secure="true">
      <Factory className="org.globus.tomcat.catalina.net.HTTPSServerSocketFactory"
               proxy="d:\\certs\x509up_u945"
               cert="d:\\certs\\usercert.pem"
               key="d:\\certs\\userkey.pem"
               cacertdir="d:\\certs\\certs"
               /> 
    </Connector>

  b) Add valve in <engine> section:

    <Valve className="org.globus.tomcat.catalina.valves.HTTPSValve"/>

Tomcat 5.0.x:
=============

1) Edit Tomcat's conf/server.xml file:

For https:

 a) Add HTTPS Connector in <service> section:

   <!-- Define a GSI HTTPS/1.1 Connector on port 8443 
            Supported parameters include:
            proxy         // proxy file for server to use
              or 
            cert          // server certificate file in PEM format 
            key           // server key file in PEM format

            cacertdir     // directory location containing trusted CA certs
            encryption (true/false)   // enable/disable encryption
    -->
   <Connector
        className="org.globus.tomcat.coyote.net.HTTPSConnector"
        port="9005"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" disableUploadTimeout="true"
        acceptCount="100" debug="0" scheme="https" 
        autoFlush="true"
        proxy="d:\\certs\x509up_u945"
        cert="d:\\certs\\usercert.pem"
        key="d:\\certs\\userkey.pem"
        cacertdir="d:\\certs\\certs" />

   Alternatively, the following should also work:

   <Connector
        className="org.globus.tomcat.coyote.net.HTTPSConnector"
        port="9005"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" disableUploadTimeout="true"
        acceptCount="100" debug="0" scheme="https" 
        autoFlush="true"
        protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol"
        socketFactory="org.globus.tomcat.catalina.net.HTTPSServerSocketFactory"
        proxy="d:\\certs\x509up_u945"
        cert="d:\\certs\\usercert.pem"
        key="d:\\certs\\userkey.pem"
        cacertdir="d:\\certs\\certs" />

 b) Add valve in <engine> section:

   <Valve className="org.globus.tomcat.coyote.valves.HTTPSValve"/>

Tomcat 5.5.x:
=============

1) Edit Tomcat's conf/server.xml file:

For https:

 a) Add HTTPS Connector in <service> section:

   <!-- Define a GSI HTTPS/1.1 Connector on port 8443 
            Supported parameters include:
            proxy         // proxy file for server to use
              or 
            cert          // server certificate file in PEM format 
            key           // server key file in PEM format

            cacertdir     // directory location containing trusted CA certs
            encryption (true/false)   // enable/disable encryption
    -->
   <Connector
        className="org.globus.tomcat.coyote.net.HTTPSConnector"
        port="9005"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" disableUploadTimeout="true"
        acceptCount="100" debug="0" scheme="https" 
        autoFlush="true"
        protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol"
        socketFactory="org.globus.tomcat.catalina.net.BaseHTTPSServerSocketFactory"

        proxy="d:\\certs\x509up_u945"
        cert="d:\\certs\\usercert.pem"
        key="d:\\certs\\userkey.pem"
        cacertdir="d:\\certs\\certs" />

 b) Add valve in <engine> section:

   <Valve className="org.globus.tomcat.coyote.valves.HTTPSValve55"/>



 Modify the security settings appropriately for your machine. You might need to
 copy over the trusted certificates and/or gridmap file if there is no
 Globus installed on your machine.

