Re: Apache2 + Tomcat4 + mod_jk2 success

2004-01-05 Thread Ian harwood
Hi
Regarding the missing files I could not find a source/binary on jakarta web
site from binaries page only solaris and windose are listed. I searched the
web and found only jakarta-tomcat-connectors-jk2-2.0.2-src something was
wrong with the realease and it would not compile. I felt that if I used the
CVS I should get the most current release taking the risk that the CVS is
the cutting edge and may not be as good as a stable release. In the CVS
release the path to JK2 source is /jakarta-tomcat-connectors/jk/native2
there is no JK2 directory in the release, I can see no reason to do it this
way and there should be a JK2 directory, something for the developers to
look at sometime I guess. I was also confused as to why there are
depreciated source files required for the build, something else for a
developer to look at.
Have you got Unix domain sockets to work with JK2? I tried but was unable to
get it to work I hade the line
channelUnix.file=/usr/local/apache2/logs/jk2.socket in my jk2.properties
file but the file was not being automatical generated by apache on startup
so error log was full of file not found messages, I created the file
myself and the errors changed to connection refused and when I stopped
apache it deleted jk2.socket file.
Sorry about the wrong path you are right should have been 
/usr/local/apache2/bin/apxs it was getting late after a long day is my
only excuse.
 Ian

- Original Message - 
From: Oscar Carrillo [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, January 05, 2004 4:04 AM
Subject: Re: Apache2 + Tomcat4 + mod_jk2 success


 Thanks. Some of the steps surprised me in missing files, etc. Can anyone
 else comment on why this would be the case?

 BTW, you have a reference to /usr/local/apache2/bin/apes, which should
 probably be /usr/local/apache2/bin/apxs.

 I'm also surprised that some of your directories say jk, not jk2. Is
 that correct?

 Oscar
 http://daydream.stanford.edu/tomcat/install_web_services.html

 On Sun, 4 Jan 2004, Ian Harwood wrote:

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache2 + Tomcat4 + mod_jk2 success

2004-01-05 Thread Timothy Stone
...snip instructions...

Ian,

Thank you! Just want'd to pass along some notes from the field on this:

1. Works on RHL8 (psyche).

2. Config:
   Binary Tomcat in /usr/local/jakarta-tomcat-4.1.29
   Source build of Apache 2.0.48 in /usr/local/httpd-2.0.48
  # maybe not the most effective/efficent build invocation
  $ ./configure \
--prefix=/usr/local/httpd-2.0.48 \
--mandir=/usr/local/man \
--enable-mods-shared=all \
--enable-file_cache=shared \
--enable-cache=shared \
--enable-disk_cache=shared \
--enable-mem_cache=shared \
--enable-deflate=shared \
--enable-ext_filter=shared \
--enable-proxy=shared \
--enable-proxy_connect=shared \
--enable-proxy_ftp=shared \
--enable-proxy_http=shared
   JTC source in /usr/local/src/jakarta-tomcat-connectors-jk2-2.0.2-src
   Download at:
   http://jakarta.apache.org/site/sourceindex.cgi
3. I *did not* have to modify source of jk_channel_socket.c and 
jk_pool.c as described. Hmmm...may be artifacts of CVS the source?

Now, I'll give this a try at home in Mac OS X Panther. But I'm not 
holding my breath. Having a bitch of a time getting that to work. :)

Tim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Apache2 + Tomcat4 + mod_jk2 success

2004-01-04 Thread Ian Harwood
Hi
Having succeeded in getting jk2_mod to work thought I would document what I
did
My setup Linux RH9 basic setup, httpd-2.0.48 installed from source NOT RPM,
tomcat-4.1.29, ant-1.5.4
The following was setup in /etc/profile
JAVA_HOME=/usr/java/java
CATALINA_HOME=/usr/local/tomcat
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:/sbin:/usr/sbin
CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar:$CATALI
NA_HOME/common/lib/servlet.jar
Add the following to the EXPORT line JAVA_HOME CATALINA_HOME CLASSPATH
You will need to logout/login or restart to set the environment

Install Apache2 from source make sure you enable dynamic loading by adding
--enable-so I also like to add --enable-mods-shared=most
Ie ./configure --enable-so --enable-mods-shared=most
I installed into the default directory (/usr/local/apache2)

Install tomcat nothing unusual here I placed mine in
/usr/local/jakarta-tomcat-4.1.29 and made a symbolic link from
/usr/local/tomcat

Test both are working OK then stop both

Now for the JK2 connector
Download the connector source from CVS this was the only way I could get all
the files needed
cvs -d :pserver:[EMAIL PROTECTED]:home/cvspublic checkout
jakarta-tomcat-connectors
This will download all files into a director jakata-tomcat-connectors
below the current directory
This brings down all connectors the one we need is in
jakata-tomcat-connectors/jk/native2
Have a read of the readme.txt file from this we can see we need to
download 2 more files (APR, APR-UTILS) the locations are given
I placed mine in /jakata-tomcat-connectors/jk/native2/apr

Run buildconf
./buildconf

Before we can go further we have to modify two of the source files
jk_channel_socket.c and jk_pool.c
Both the files are in jk/native2/common
Jk_channel_socket.c find #error jk_channel_socket is deprecated line74
just after copyright notice
Remove this line
Jk_pool.c find #error jk_pool is deprecated line64 just after copyright
notice
Remove this line

Run configure
We need to add some parameters to configure:
./configure --with-apxs2=/usr/local/apache2/bin/apes
--with-tomcat41=/usr/local/tomcat --with-java-home=/usr/java/java --with-jni
Change all paths to suit your system
Hopefully all will go well

Run Make
./make

At the end of make you will see a message about running libtools for me it
was
Libtool --finish /usr/local/apache2/modules
This did not work for me I just copied mod_jk2.so from
/jk/build/jk2/apache2 to /usr/local/apache2/modules
And libjkjni.so to /usr/local/tomcat/server/lib

Make sure apache and tomcat are not running
File jk2.properties
/usr/local/tomcat/conf/jk2.properties
handler.list=channelSocket,request
channelSocket.port=8009
channelSocket.address=127.0.0.1


File httpd.conf
/usr/local/apache2/conf/httpd.conf
Add 
LoadModule jk2_module modules/mod_jk2.so

File workers2.properties
/usr/local/apache2/conf/workers2.properties
[shm]
file=/usr/local/apache2/logs/jk2.shm
size=1048576
debug=0
Disabled=0

[channel.socket:localhost:8009]

[status:status]
[uri:/jkstatus/*]
group=status:status

[uri:/examples/*]
Info=map the entire examples webapp
Debug=0

[uri:/tomcat-docs/*]

You will need to add uri for all the webapps you use

OK time to test all this
Start tomcat first can be a bit slow to start give a little time
Start apache2
Goto http://localhost you should get default apache2 goto
http://localhost:8080 you should get default tomcat page
Goto http://localhost/examples you should get tomcat directory listing if so
all done

I hope this works for you I have not tested this greatly so may still be
thinks missing
Ian



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache2 + Tomcat4 + mod_jk2 success

2004-01-04 Thread Oscar Carrillo
Thanks. Some of the steps surprised me in missing files, etc. Can anyone 
else comment on why this would be the case?

BTW, you have a reference to /usr/local/apache2/bin/apes, which should 
probably be /usr/local/apache2/bin/apxs.

I'm also surprised that some of your directories say jk, not jk2. Is 
that correct?

Oscar
http://daydream.stanford.edu/tomcat/install_web_services.html

On Sun, 4 Jan 2004, Ian Harwood wrote:

 Hi
 Having succeeded in getting jk2_mod to work thought I would document what I
 did
 My setup Linux RH9 basic setup, httpd-2.0.48 installed from source NOT RPM,
 tomcat-4.1.29, ant-1.5.4
 The following was setup in /etc/profile
 JAVA_HOME=/usr/java/java
 CATALINA_HOME=/usr/local/tomcat
 PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:/sbin:/usr/sbin
 CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar:$CATALI
 NA_HOME/common/lib/servlet.jar
 Add the following to the EXPORT line JAVA_HOME CATALINA_HOME CLASSPATH
 You will need to logout/login or restart to set the environment
 
 Install Apache2 from source make sure you enable dynamic loading by adding
 --enable-so I also like to add --enable-mods-shared=most
 Ie ./configure --enable-so --enable-mods-shared=most
 I installed into the default directory (/usr/local/apache2)
 
 Install tomcat nothing unusual here I placed mine in
 /usr/local/jakarta-tomcat-4.1.29 and made a symbolic link from
 /usr/local/tomcat
 
 Test both are working OK then stop both
 
 Now for the JK2 connector
 Download the connector source from CVS this was the only way I could get all
 the files needed
 cvs -d :pserver:[EMAIL PROTECTED]:home/cvspublic checkout
 jakarta-tomcat-connectors
 This will download all files into a director jakata-tomcat-connectors
 below the current directory
 This brings down all connectors the one we need is in
 jakata-tomcat-connectors/jk/native2
 Have a read of the readme.txt file from this we can see we need to
 download 2 more files (APR, APR-UTILS) the locations are given
 I placed mine in /jakata-tomcat-connectors/jk/native2/apr
 
 Run buildconf
 ./buildconf
 
 Before we can go further we have to modify two of the source files
 jk_channel_socket.c and jk_pool.c
 Both the files are in jk/native2/common
 Jk_channel_socket.c find #error jk_channel_socket is deprecated line74
 just after copyright notice
 Remove this line
 Jk_pool.c find #error jk_pool is deprecated line64 just after copyright
 notice
 Remove this line
 
 Run configure
 We need to add some parameters to configure:
 ./configure --with-apxs2=/usr/local/apache2/bin/apes
 --with-tomcat41=/usr/local/tomcat --with-java-home=/usr/java/java --with-jni
 Change all paths to suit your system
 Hopefully all will go well
 
 Run Make
 ./make
 
 At the end of make you will see a message about running libtools for me it
 was
 Libtool --finish /usr/local/apache2/modules
 This did not work for me I just copied mod_jk2.so from
 /jk/build/jk2/apache2 to /usr/local/apache2/modules
 And libjkjni.so to /usr/local/tomcat/server/lib
 
 Make sure apache and tomcat are not running
 File jk2.properties
 /usr/local/tomcat/conf/jk2.properties
 handler.list=channelSocket,request
 channelSocket.port=8009
 channelSocket.address=127.0.0.1
 
 
 File httpd.conf
 /usr/local/apache2/conf/httpd.conf
 Add 
 LoadModule jk2_module modules/mod_jk2.so
 
 File workers2.properties
 /usr/local/apache2/conf/workers2.properties
 [shm]
 file=/usr/local/apache2/logs/jk2.shm
 size=1048576
 debug=0
 Disabled=0
 
 [channel.socket:localhost:8009]
 
 [status:status]
 [uri:/jkstatus/*]
 group=status:status
 
 [uri:/examples/*]
 Info=map the entire examples webapp
 Debug=0
 
 [uri:/tomcat-docs/*]
 
 You will need to add uri for all the webapps you use
 
 OK time to test all this
 Start tomcat first can be a bit slow to start give a little time
 Start apache2
 Goto http://localhost you should get default apache2 goto
 http://localhost:8080 you should get default tomcat page
 Goto http://localhost/examples you should get tomcat directory listing if so
 all done
 
 I hope this works for you I have not tested this greatly so may still be
 thinks missing
 Ian
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]