MOD_JK ---> Apache + Tomcat

This is a discussion on MOD_JK ---> Apache + Tomcat within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello, I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1 I am ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-30-2003
Hari Om
 
Posts: n/a
Default MOD_JK ---> Apache + Tomcat

Hello,

I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1

I am working on the Connector MOD_JK.SO which I build from the source and
put in /modules directory. When I run my Tomcat first and then Apache and
then acceess http://My.domian.name/kuki it does not work... it says "Page
cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
find this file anywhere.

Can anyone help me out in connecting Apache and Tomncat. Here are my Config
Files:

-----------
SERVER.XML
-----------
# added following after <Server Port="8005"....>

<Listener className="org.apache.ajp.tomcat4.config.ApacheCon fig"
modJk="/usr/local/apache2/modules/mod_jk.so" jkDebug="info"
workersConfig="/usr/local/tomcat4/conf/jk/workers.properties"
jkLog="/usr/local/tomcat4/logs/mod_jk.log"/>

<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>


<Host name="my.domain.name" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">

<Listener className="org.apache.ajp.tomcat4.config.ApacheCon fig"
append="true" />


<Context path="/kuki" docBase="/home/kuki/kuki/webapps/kuki"
reloadable="true">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-------------------
WORKERS.PROPERTIES
-------------------
workers.CATALINA_HOME=/usr/local/tomcat4
workers.java_home=$(JAVA_HOME)
ps=/

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=my.domain.name
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=5
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-------------------------------------------
MOD_JK.CONF <this file is AUTO GENERATED>
-------------------------------------------
########## Auto generated on Mon Dec 29 14:10:45 MST 2003##########

<IfModule !mod_jk.c>
LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
</IfModule>

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat4/logs/mod_jk.log"

JkLogLevel info



<VirtualHost my.domain.name>
ServerName my.domain.name

JkMount /kuki ajp13
JkMount /kuki/* ajp13

JkMount /examples ajp13
JkMount /examples/* ajp13
</VirtualHost>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

------------
HTTPD.CONF
------------
Listen My.IP.ADDR.ESS:80

<IfModule !mod_jk.c>
LoadModule jk_module modules/mod_jk.so
</IfModule>

ServerName my.domain.name:80

JkWorkersFile "/usr/local/tomcat4/conf/jk/workers.properties"
JkLogFile "/usr/local/apache2/logs/mod_jk.log"

JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /kuki ajp13
JkMount /kuki/* ajp13
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Can anyone please GUIDE me on this Connection Process....?

THANKS! and HAPPY NEW YEAR!

HARI OM
  #2 (permalink)  
Old 12-30-2003
ChronoFish
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat


"Hari Om" <hari_om@hotmail.com> wrote in message news:d1d5ebe4.0312301037.2cad3e8b@posting.google.c om...
> Hello,
>
> I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1
>
> I am working on the Connector MOD_JK.SO which I build from the source and
> put in /modules directory. When I run my Tomcat first and then Apache and
> then acceess http://My.domian.name/kuki it does not work... it says "Page
> cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
> find this file anywhere.
>


I assume that the same problem happens when running Apache first? I think that is supposed to be the order - but maybe not.

How about this - can you run Tomcat on port 8080?

I assume that Apache itself is accessible - am I right?

Obviously I implying that Tomcat and Apache need to run independently before they can be linked together.

Also - and this is probably what will help you - in my Apache 2.x configuration I used the jk2 connector.

- CF


  #3 (permalink)  
Old 12-30-2003
Hari Om
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat

THANKS ChronoFish.

My APache and Tomcat (on 8080) are working GREAT independentaly.....
Infact http://My.domian.name:8080/kuki works GREAT BUT
http://My.domian.name/kuki DOES NOT WORK...wonder why.

Can u send me some link on JK2? what platform r u using JK2?

HARI OM


"ChronoFish" <deja@chronofish.com> wrote in message news:<tlkIb.23363$ti2.11258@lakeread03>...
> "Hari Om" <hari_om@hotmail.com> wrote in message news:d1d5ebe4.0312301037.2cad3e8b@posting.google.c om...
> > Hello,
> >
> > I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1
> >
> > I am working on the Connector MOD_JK.SO which I build from the source and
> > put in /modules directory. When I run my Tomcat first and then Apache and
> > then acceess http://My.domian.name/kuki it does not work... it says "Page
> > cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
> > find this file anywhere.
> >

>
> I assume that the same problem happens when running Apache first? I think that is supposed to be the order - but maybe not.
>
> How about this - can you run Tomcat on port 8080?
>
> I assume that Apache itself is accessible - am I right?
>
> Obviously I implying that Tomcat and Apache need to run independently before they can be linked together.
>
> Also - and this is probably what will help you - in my Apache 2.x configuration I used the jk2 connector.
>
> - CF

  #4 (permalink)  
Old 12-31-2003
Jack Shieh
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat

Hari Om wrote:
> THANKS ChronoFish.
>
> My APache and Tomcat (on 8080) are working GREAT independentaly.....
> Infact http://My.domian.name:8080/kuki works GREAT BUT
> http://My.domian.name/kuki DOES NOT WORK...wonder why.
>
> Can u send me some link on JK2? what platform r u using JK2?
>
> HARI OM
>
>
> "ChronoFish" <deja@chronofish.com> wrote in message news:<tlkIb.23363$ti2.11258@lakeread03>...
>
>>"Hari Om" <hari_om@hotmail.com> wrote in message news:d1d5ebe4.0312301037.2cad3e8b@posting.google.c om...
>>
>>>Hello,
>>>
>>>I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1
>>>
>>>I am working on the Connector MOD_JK.SO which I build from the source and
>>>put in /modules directory. When I run my Tomcat first and then Apache and
>>>then acceess http://My.domian.name/kuki it does not work... it says "Page
>>>cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
>>>find this file anywhere.
>>>

>>
>>I assume that the same problem happens when running Apache first? I think that is supposed to be the order - but maybe not.
>>
>>How about this - can you run Tomcat on port 8080?
>>
>>I assume that Apache itself is accessible - am I right?
>>
>>Obviously I implying that Tomcat and Apache need to run independently before they can be linked together.
>>
>>Also - and this is probably what will help you - in my Apache 2.x configuration I used the jk2 connector.
>>
>>- CF

Seemed like you're running jk not jk2. I wonder how you configured your
httpd.conf. Run Tomcat 1st, because it will generate a mod_jk.conf file
to be used by Apache.

Jack

  #5 (permalink)  
Old 12-31-2003
Jack Shieh
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat

Hari Om wrote:

> THANKS ChronoFish.
>
> My APache and Tomcat (on 8080) are working GREAT independentaly.....
> Infact http://My.domian.name:8080/kuki works GREAT BUT
> http://My.domian.name/kuki DOES NOT WORK...wonder why.
>
> Can u send me some link on JK2? what platform r u using JK2?
>
> HARI OM
>
>
> "ChronoFish" <deja@chronofish.com> wrote in message news:<tlkIb.23363$ti2.11258@lakeread03>...
>
>>"Hari Om" <hari_om@hotmail.com> wrote in message news:d1d5ebe4.0312301037.2cad3e8b@posting.google.c om...
>>
>>>Hello,
>>>
>>>I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1
>>>
>>>I am working on the Connector MOD_JK.SO which I build from the source and
>>>put in /modules directory. When I run my Tomcat first and then Apache and
>>>then acceess http://My.domian.name/kuki it does not work... it says "Page
>>>cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
>>>find this file anywhere.
>>>

>>
>>I assume that the same problem happens when running Apache first? I think that is supposed to be the order - but maybe not.
>>
>>How about this - can you run Tomcat on port 8080?
>>
>>I assume that Apache itself is accessible - am I right?
>>
>>Obviously I implying that Tomcat and Apache need to run independently before they can be linked together.
>>
>>Also - and this is probably what will help you - in my Apache 2.x configuration I used the jk2 connector.
>>
>>- CF

Sorry for missing your 1st posting, which has your httpd.conf. Try to
add "Include $CATALINA_HOME/conf/auto/mod_jk.conf" to your httpd.conf.

Jack

  #6 (permalink)  
Old 12-31-2003
Hari Om
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat

Hi Jack,

Thanks! I tried adding "Include ...mod_jk.conf" but in vain...there
is NO difference wonder why.....any other tips?

HARI OM

Jack Shieh <shiehj@swbell.net> wrote in message news:<TRwIb.595$4Q1.274868385@newssvr11.news.prodi gy.com>...
> Hari Om wrote:
>
> > THANKS ChronoFish.
> >
> > My APache and Tomcat (on 8080) are working GREAT independentaly.....
> > Infact http://My.domian.name:8080/kuki works GREAT BUT
> > http://My.domian.name/kuki DOES NOT WORK...wonder why.
> >
> > Can u send me some link on JK2? what platform r u using JK2?
> >
> > HARI OM
> >
> >
> > "ChronoFish" <deja@chronofish.com> wrote in message news:<tlkIb.23363$ti2.11258@lakeread03>...
> >
> >>"Hari Om" <hari_om@hotmail.com> wrote in message news:d1d5ebe4.0312301037.2cad3e8b@posting.google.c om...
> >>
> >>>Hello,
> >>>
> >>>I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1
> >>>
> >>>I am working on the Connector MOD_JK.SO which I build from the source and
> >>>put in /modules directory. When I run my Tomcat first and then Apache and
> >>>then acceess http://My.domian.name/kuki it does not work... it says "Page
> >>>cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
> >>>find this file anywhere.
> >>>
> >>
> >>I assume that the same problem happens when running Apache first? I think that is supposed to be the order - but maybe not.
> >>
> >>How about this - can you run Tomcat on port 8080?
> >>
> >>I assume that Apache itself is accessible - am I right?
> >>
> >>Obviously I implying that Tomcat and Apache need to run independently before they can be linked together.
> >>
> >>Also - and this is probably what will help you - in my Apache 2.x configuration I used the jk2 connector.
> >>
> >>- CF

> Sorry for missing your 1st posting, which has your httpd.conf. Try to
> add "Include $CATALINA_HOME/conf/auto/mod_jk.conf" to your httpd.conf.
>
> Jack

  #7 (permalink)  
Old 12-31-2003
Jack Shieh
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat

Hari Om wrote:
> Hi Jack,
>
> Thanks! I tried adding "Include ...mod_jk.conf" but in vain...there
> is NO difference wonder why.....any other tips?
>
> HARI OM
>
> Jack Shieh <shiehj@swbell.net> wrote in message news:<TRwIb.595$4Q1.274868385@newssvr11.news.prodi gy.com>...
>
>>Hari Om wrote:
>>
>>
>>>THANKS ChronoFish.
>>>
>>>My APache and Tomcat (on 8080) are working GREAT independentaly.....
>>>Infact http://My.domian.name:8080/kuki works GREAT BUT
>>>http://My.domian.name/kuki DOES NOT WORK...wonder why.
>>>
>>>Can u send me some link on JK2? what platform r u using JK2?
>>>
>>>HARI OM
>>>
>>>
>>>"ChronoFish" <deja@chronofish.com> wrote in message news:<tlkIb.23363$ti2.11258@lakeread03>...
>>>
>>>
>>>>"Hari Om" <hari_om@hotmail.com> wrote in message news:d1d5ebe4.0312301037.2cad3e8b@posting.google.c om...
>>>>
>>>>
>>>>>Hello,
>>>>>
>>>>>I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1
>>>>>
>>>>>I am working on the Connector MOD_JK.SO which I build from the source and
>>>>>put in /modules directory. When I run my Tomcat first and then Apache and
>>>>>then acceess http://My.domian.name/kuki it does not work... it says "Page
>>>>>cannot be found" wonder why? I also try to see MOD_JK.LOG file but I cannot
>>>>>find this file anywhere.
>>>>>
>>>>
>>>>I assume that the same problem happens when running Apache first? I think that is supposed to be the order - but maybe not.
>>>>
>>>>How about this - can you run Tomcat on port 8080?
>>>>
>>>>I assume that Apache itself is accessible - am I right?
>>>>
>>>>Obviously I implying that Tomcat and Apache need to run independently before they can be linked together.
>>>>
>>>>Also - and this is probably what will help you - in my Apache 2.x configuration I used the jk2 connector.
>>>>
>>>>- CF

>>
>>Sorry for missing your 1st posting, which has your httpd.conf. Try to
>>add "Include $CATALINA_HOME/conf/auto/mod_jk.conf" to your httpd.conf.
>>
>>Jack

Hari,

On you httpd.conf, you have

<IfModule !mod_jk.c>
LoadModule jk_module modules/mod_jk.so
</IfModule>

Try to take out <IfModule>, simple becuase it won't generate any error
logs even it had problems. When running Tomcat, I used
"startup-using-launcher" and checked the
"$CATALLINE_HOME/logs/catalina.out" file to make sure my server.xml has
no problmes. For Apache, use "apachectl -t" to check the syntex of your
httpd.conf file.

Jack

  #8 (permalink)  
Old 01-02-2004
Hari Om
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat

Hi Jack,

THANKS! and HAPPY NEW YEAR!

Yes...I did RESTART my APACHE but in vain....
When I run apachectl configtest...it says "Syntax OK".
How can I be sure if MOD_JK. is loaded?

WEhen I point my browser @ http://my.domain.name it works fine BUT
when I run @ http://my.domain.name/examples i shows

My ERROR_LOG file shows following:
--------------------------------------------------------------
[Fri Jan 02 09:36:58 2004] [error] [client 128.109.192.213] File does
not exist: /usr/local/htdocs/examples
--------------------------------------------------------------

and My browser shows following:
--------------------------------------------------------------
Not Found
The requested URL /examples was not found on this server.
--------------------------------------------------------------

However, my http://my.domain.name:8080/examples WORKS fine.

When I run "netstat -na" it shows following PORTS are LISTENING:
80, 8080, 8009

When I run ./httpd -l it shows following modules:
--------------------------------------------------------------
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
--------------------------------------------------------------

Any related informaiton on this is appreciated.

HAPPY NEW YEAR AGAIN!

HARI OM
  #9 (permalink)  
Old 01-05-2004
Jack Shieh
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat

Hari Om wrote:
> Hi Jack,
>
> THANKS! and HAPPY NEW YEAR!
>
> Yes...I did RESTART my APACHE but in vain....
> When I run apachectl configtest...it says "Syntax OK".
> How can I be sure if MOD_JK. is loaded?
>
> WEhen I point my browser @ http://my.domain.name it works fine BUT
> when I run @ http://my.domain.name/examples i shows
>
> My ERROR_LOG file shows following:
> --------------------------------------------------------------
> [Fri Jan 02 09:36:58 2004] [error] [client 128.109.192.213] File does
> not exist: /usr/local/htdocs/examples
> --------------------------------------------------------------
>
> and My browser shows following:
> --------------------------------------------------------------
> Not Found
> The requested URL /examples was not found on this server.
> --------------------------------------------------------------
>
> However, my http://my.domain.name:8080/examples WORKS fine.
>
> When I run "netstat -na" it shows following PORTS are LISTENING:
> 80, 8080, 8009
>
> When I run ./httpd -l it shows following modules:
> --------------------------------------------------------------
> Compiled in modules:
> core.c
> mod_access.c
> mod_auth.c
> mod_include.c
> mod_log_config.c
> mod_env.c
> mod_setenvif.c
> prefork.c
> http_core.c
> mod_mime.c
> mod_status.c
> mod_autoindex.c
> mod_asis.c
> mod_cgi.c
> mod_negotiation.c
> mod_dir.c
> mod_imap.c
> mod_actions.c
> mod_userdir.c
> mod_alias.c
> mod_so.c
> --------------------------------------------------------------
>
> Any related informaiton on this is appreciated.
>
> HAPPY NEW YEAR AGAIN!
>
> HARI OM

Hari,

Try to do the following:

1. Shutdown both Apache and Tomcat.
2. Startup Tomcat 1st and make sure a new version of mod_jk is generated
3. Startup Apache
4. Use your browser to open up http://localhost/jsp-examples

If you startup Apache 1st, your mod_jk won't work since Tomcat is not
activated.

Jack

  #10 (permalink)  
Old 01-07-2004
ChronoFish
 
Posts: n/a
Default Re: MOD_JK ---> Apache + Tomcat


"Hari Om" <hari_om@hotmail.com> wrote in message news:d1d5ebe4.0312301421.3e7d7438@posting.google.c om...
> THANKS ChronoFish.
>
> My APache and Tomcat (on 8080) are working GREAT independentaly.....
> Infact http://My.domian.name:8080/kuki works GREAT BUT
> http://My.domian.name/kuki DOES NOT WORK...wonder why.
>
> Can u send me some link on JK2? what platform r u using JK2?
>
> HARI OM
>
>
> "ChronoFish" <deja@chronofish.com> wrote in message news:<tlkIb.23363$ti2.11258@lakeread03>...
> > "Hari Om" <hari_om@hotmail.com> wrote in message news:d1d5ebe4.0312301037.2cad3e8b@posting.google.c om...
> > > Hello,
> > >
> > > I am using APache 2.0.47 and Tomcat 4.1.27 on SuSE Linux 8.1
> > >


Hi Hari,

Seems like you are still struggling. I scoured the Internet for weeks and finally gave up on JK. As far as I can tell you need to
use JK2 when using Apache 2+ and Tomcat 4.1+ - and I have it now working on a server that is also supporting PHP, MySQL and
Postgres. In fact I have PHP and Java sharing session data - how cool is that?!

Here is a link to get you started- but let Google be your friend. It won't let you down.

http://jakarta.apache.org/tomcat/tom...tallhowto.html


-CF


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:11 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0