| ||||||||||||||||
| ||||||||||||||||
Running Perl CGI scripts under Apache Tomcat Posted by admin (Graham Ellis), 6 September 2005 Q I'm using Tomcat but I've got thie script in Perl. Do I have to run Apache httpd as well?A Common wisdom is that you use Apache httpd for general web serving, including PHP and Perl scripts through CGI. And you use Apache Tomcat for Javabased applications. Common wisdom goes on to say that if you require both Perl and Java applications, you run both httpd and Tomcat. But .. if you've only got a little CGI traffic, you can serve CGI scripts through Tomcat. How? 1. 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:
b) Associate URLs cgi-bin with the CGI Servlet. Code:
2. Rename the CGI jars supplied with (but disabled) in Tomcat Code:
3. In your webapps/xxxx/WEB-INF folder, add a new directory called cgi and place your CGI script in there. Example content: Code:
And mark this file executable Then restart Tomcat to ensure it's picked up the new, global, web.xml file. Note - this example is written with exact details for Tomcat 5.5.9, Apache 2.0.54 and Fedora Core 3 Linus. Posted by admin (Graham Ellis), 9 January 2006 on 09/06/05 at 19:22:52, Graham Ellis wrote:
Err ... the answer I gave was that you DON'T necessarily need httpd, so the httpd version 2.0.54 that I mentioned is totally irrelevant ![]() This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
edit your own (not yet published) comments Average page ranking - 5.0 |
| |||||||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |