You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Hrastnik <pe...@1012surf.net> on 2001/08/23 16:56:33 UTC

Re: Tomcat running CGI scripts!!

Just read
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-apache-howto.html.
In "Making Apache Serve your Context's Static Files" you find a sample
configuration that can help you. In your configuration every request is
served by tomcat (ApJServMount / /root) and here only static files are
served by tomcat.

Bye,
	Peter.


-- 
Mag. Peter Hrastnik
tele.ring Telekom Service GmbH
A-1030 Wien, Hainburgerstr. 33
Tel.: +43/1/931012/3277, Mobil: +43/650/6503277


"Corey M. Ellis" wrote:
> 
> Hi everyone,
> 
> I have a dilemna, that I would like to know if there is a solution.  We have
> Apache and Tomcat configured and is up and running a java application.  We
> have mounted the entire / to tomcat so every request essentially goes to
> him.  This setup was for application reasons, and cannot be changed without
> major changes to the application.
> 
> Now we never had a reason to run cgi scripts on this server, but now we do,
> and hence the problem. When we place a perl script in
> /usr/local/apache/cgi-bin/  "Everything works when the Apache is running by
> itself with the Tomcat include file commented out, but when Apache has the
> include file with tomcat running.  The cgi-bin scripts fail, they just print
> out the text files.
> 
> I am desperate need of a solution that will have the following outcome,
> Apache and Tomcat running, with Tomcat mounting the entire Apache tree, and
> also the ability to place cgi scripts in a directory that will be run either
> through Tomcat some kind of way, or through Apache directly, it doesn't
> matter how they are run, as long as they can run.
> 
> Any advice, and configuration tips will be greatly helpful.  And also
> remember, the Tomcat must maintain the entire Apache tree.  Config file for
> Tomcat looks like this.
> 
> ############################################################################
> ###
> #                     Apache JServ Configuration File
> #
> ############################################################################
> ###
> 
> # Note: this file should be appended or included into your httpd.conf
> 
> # Tell Apache on win32 to load the Apache JServ communication module
> # LoadModule jserv_module modules/ApacheModuleJServ.dll
> 
> # Tell Apache on Unix to load the Apache JServ communication module
> # For shared object builds only!!!
> # @LOAD_OR_NOT@LoadModule jserv_module @LIBEXECDIR@/mod_jserv.so
> LoadModule jserv_module libexec/mod_jserv.so
> 
> <IfModule mod_jserv.c>
> # Do not edit!
> ApJServManual on
> ApJServDefaultProtocol ajpv12
> ApJServSecretKey DISABLED
> ApJServMountCopy on
> ApJServLogLevel debug
> 
> ### Change if you run tomcat on a different host
> #ApJServDefaultHost localhost
> ApJServDefaultPort 8007
> 
> #################### All jsp files will go to tomcat ####################
> ApJServMount default /root
> 
> AddType text/jsp .jsp
> AddHandler jserv-servlet .jsp
> 
> ############################## Context mapping - all requests go to tomcat
> 
> ApJServMount / /root
> 
> ############################## Context mapping - you need to "deploy"
> # ( copy or ln -s ) the context into htdocs
> ##
> 
> # ApJservMount /CONTEXT/servlet  /root
> # <Location /CONTEXT/WEB-INF/ >
> #      AllowOverride None
> #      Allow from all
> # </Location>
> <Location /control>
>   AuthType Basic
>   AuthName "For internal users only"
>   AuthUserFile /usr/local/apache/users
>   AuthType Basic
> 
>   <Limit GET POST>
>   require user webodigo
>   </Limit>
> </Location>
> </IfModule>
> 
> Thanks in advance
> 
> =============================================
> Corey M. Ellis
> Network Administrator
> 11 Broadway, Suite 365, New York, NY 10004
> coreye@odigo.com Phone: 212.809.2002 x:16
> Fax: 212.809.2092 Mobile: 917.868.8535
> Odigo: 279170
> ============================================
> Odigo. Communication Redefined. www.odigo.com