Opened 16 years ago

Closed 16 years ago

Last modified 9 years ago

#314 closed task (fixed)

Configure tomcat cgi for remote greenstone3

Reported by: oranfry Owned by: nobody
Priority: moderate Milestone: 3.04 Release
Component: Greenstone3 Runtime Severity: major
Keywords: Cc:

Description

Cgi must be enabled in tomcat for remote greenstone3 to work. We have had this in the past but it was wiped when we upgraded tomcat. Once we have settled on a tomcat version for the next release, we should remember to enable cgi in tomcat before sending it out.

These instructions for enabling cgi sent to the greenstone3 mailing list by Quan:

Hi all greenstone3 users

If you are using Greenstone3(3.03) and want to run the remote gli, a few
things have to be done before testing the tomcat cgi.

1. Rename the CGI jars supplied with (but disabled) in Tomcat

 cd greenstone3/packages/tomcat/server/lib
 mv servlets-ssi.renametojar servlets-ssi.jar
 mv servlets-cgi.renametojar servlets-cgi.jar

2. Alter Tomcat's conf/web.xml file

 a) There's a CGIServlet that's commented out; remove the comments so that
 the live file contains.

 Code:
 <servlet>
        <servlet-name>cgi</servlet-name>
      <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>6</param-value>
        </init-param>
        <init-param>
          <param-name>cgiPathPrefix</param-name>
          <param-value>WEB-INF/cgi</param-value>
        </init-param>
        <init-param>
           <param-name>passShellenvironment</param-name>
           <param-value>true</param-value>
         </init-param>
        <init-param>
 	   <param-name>executable</param-name>
           <param-value>/usr/bin/perl</param-alue>
        </init-param>
         <load-on-startup>5</load-on-startup>
    </servlet>

 Note: <init-param>
           <param-name>passShellenvironment</param-name>
           <param-value>true</param-value>
         </init-param>
        <init-param>
 	   <param-name>executable</param-name>
           <param-value>/usr/bin/perl</param-alue>
        </init-param>
 needs to be added in.

 b) Associate URLs cgi-bin with the CGI Servlet.

 Code:
 <servlet-mapping>
        <servlet-name>cgi</servlet-name>
        <url-pattern>/cgi-bin/*</url-pattern>
    </servlet-mapping>

3. Then, please follow the instruction at
http://wiki.greenstone.org/wiki/index.php/Remote_Greenstone3 for the rest
steps.

Quan

Change History (3)

comment:1 by davidb, 16 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.