Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running cgi from the root of the web app (for bugzilla)

Status
Not open for further replies.

liorza

Programmer
Mar 3, 2004
27
US
Hello all,
I am trying to configure tomcat to run bugzilla.

I followed the instruction needed in order to be able to run cgi scripts from tomcat.

Also I made sure that cgi servlet mapping in the web.xml is uncommented.

Now I have installed bugzilla into c:\bugzilla and all the cgi files are located in root of the web app (c:\bugzilla). If I try to access
localhost:8080\bugzilla\lndex.cgi
then tomcat reads it as a text file.
I wanted to make sure that tomcat can deal with the cgi and perl so I have created a folder cgi-bin and placed a lior.cgi file in it.
If I access
localhost:8080\bugzilla\cgi-bin\lior.cgi
The file run ok and returns the desired output.

Here is parts from the my web.xml that refer to cgi:


<servlet>
<servlet-name>cgi</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
<init-param>
<param-name>clientInputTimeout</param-name>
<param-value>100</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>1</param-value>
</init-param>
<init-param>
<param-name>cgiPathPrefix</param-name>
<param-value>cgi-bin</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>

<!-- The mapping for the CGI Gateway servlet -->


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

I have tried modifying cgiPathPrefix value to: null, * or ‘/’
So it will reference the cgi files in the root of the web app but did not work.

I have tried also to modify also the value for:
<url-pattern>/cgi-bin/*</url-pattern>
To be *, *.cgi
Still it was not working and also now I had issue with other web app that was running on that server (jsp pages).

I see that the issue here is that Tomcat has to look for cgi in other folder then the root folder. The question Is if there any thing I can do about it?

Is any one had this issue when running bugzilla on Tomacat?
Lior
 
I always use mod_jk and leave cgi handling to vanilla Apache up front as a reverse proxy.

That doesn't solve your problem but its an option if you can not get this resolved.

 

If you read the description of mod_jk, you will find that Tomcat has expressly left out support for external CGI.
 
Thanks guys, I gave up and configured Bugzilla with IIS
Lior
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top