On Fri, Oct 10, 2008 at 1:20 PM, Tim Potter <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 10, 2008 at 12:16 PM, Rainer Jung <[EMAIL PROTECTED]>wrote: > >> I also added <Listener className="org.apache.jk.config.ApacheConfig" >>> modJk="/usr/lib/apache2/mod_jk.so" >>> workersConfig="/etc/apache2/workers.properties" /> between </Host> and >>> </Engine> in the conf/server.xml file >>> >> >> The listeners are only needed if you want Tomcat to generate a mod_jk >> configuration for you. The files which are auto-generated by the listener >> are not very good though. I would suggest to write a simple >> workers.properties yourself. >> >> worker.list=worker1 >> worker.worker1.host=XXX >> worker.worker1.port=YYY >> >> XXX should by the address of the system, on which your Tomcat runs. If it >> is the same as your Apache system, "localhost" should do it. You can use >> names or IP address, but the name has to be resolvable during startup of >> httpd. >> >> YYY is the port number of your Tomcat AJP port. It is not the same as the >> HTTP port of Tomcat (8090). You will find the port number in your >> server.xml. There should be a Connector element there for the AJP protocol. >> By default it is 8009. >> >> Now Apache starts successfully. I also modified jk_mod section: JkMount >>> /*.jsp worker1 as you suggested. >>> >> >> If everything works, you should have a look the the "reference" docs pages >> for tomcat-connectors, especially those concerning Apache and Workers. >> >> Regards, >> >> Rainer >> > > > It seems that every thing is running, however I get the Tomcat 404 > error (in the Tomcat style, not apache style) on a test page that I have put > in /var/www > > [EMAIL PROTECTED]:~$ ls -al /var/www | grep test > -rw-r--r-- 1 root root 235 2008-10-10 12:04 test.jsp > > output of apache2/error.log > [Fri Oct 10 12:59:32 2008] [notice] Apache/2.2.4 (Ubuntu) > PHP/5.2.3-1ubuntu6.4 mod_jk/1.2.23 configured -- resuming normal operations > output of access.log > xxx.xxx.xxx.xxx- - [10/Oct/2008:13:00:26 -0500] "GET /test.jsp HTTP/1.1" > 404 979 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET > CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)" > output of mod_jk.log > [Fri Oct 10 12:59:32 2008] [19584:34480] [info] init_jk::mod_jk.c (2743): > mod_jk/1.2.23 initialized > [Fri Oct 10 12:59:32 2008] [19585:34480] [info] init_jk::mod_jk.c (2743): > mod_jk/1.2.23 initialized > output of catalina.out > Oct 10, 2008 12:59:53 PM org.apache.catalina.core.AprLifecycleListener init > INFO: The APR based Apache Tomcat Native library which allows optimal > performance in production environments was not found on the > java.library.path: > /usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib > Oct 10, 2008 12:59:54 PM org.apache.coyote.http11.Http11Protocol init > INFO: Initializing Coyote HTTP/1.1 on http-8090 > Oct 10, 2008 12:59:54 PM org.apache.catalina.startup.Catalina load > INFO: Initialization processed in 645 ms > Oct 10, 2008 12:59:54 PM org.apache.catalina.core.StandardService start > INFO: Starting service Catalina > Oct 10, 2008 12:59:54 PM org.apache.catalina.core.StandardEngine start > INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 > Oct 10, 2008 12:59:54 PM org.apache.coyote.http11.Http11Protocol start > INFO: Starting Coyote HTTP/1.1 on http-8090 > Oct 10, 2008 12:59:54 PM org.apache.jk.common.ChannelSocket init > INFO: JK: ajp13 listening on /0.0.0.0:8009 > Oct 10, 2008 12:59:54 PM org.apache.jk.server.JkMain start > INFO: Jk running ID=0 time=0/37 config=null > Oct 10, 2008 12:59:54 PM org.apache.catalina.startup.Catalina start > INFO: Server startup in 924 ms > > So It seems that the call to test.jsp is being redirected somewhere? Am I > missing something? > > Thanks again! > I was definately on to something as I went to http://mysite/index.jsp and got to the webapp/ROOT/index.jsp status page!! but the images are not loading error.log: [Fri Oct 10 13:25:49 2008] [error] [client xxxxxxx] File does not exist: /var/www/tomcat-power.gif, referer: http://mysite/index.jsp I honestly do not care too much about that, I can try to fix that later. Snow my question is how do I make the calls transparent, in that when I go to http://mysite/~username/index.jsp it GET's from /home/~username/public_html/index.jsp and parses the script instead of just displays the html?