Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Preconfigured mod_jk.so for Apache

Preconfigured mod_jk.so for Apache
Thread Tools
Junior Member
Join Date: Mar 2001
Location: Rochester, NY, USA
Status: Offline
Reply With Quote
Apr 2, 2001, 01:09 AM
 
Anybody have a pre-configured mod_jk.so for Apache? I would love it. I have feverishly tried to get my own mod_jk.so for 2 days -- and without any luck, I could not get then to build without errors. I keep on bumping into problems after problems.

I even tried using mod_jserv.so but I can't get it to work because of _main errors.

This is for modules to enable Tomcat 3.2.1 and Apache 1.3.19

Thanks,
Chad Taylor
Chad Taylor
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 2, 2001, 03:22 PM
 
I think I got it to compile.

First of all, get dlcompat library from http://fink.sourceforge.net

Then, compile with this command (from src/native/apache1.3 or whatever):
apxs -o mod_jk.so -I../jk -I/System/Library/Frameworks/JavaVM.framework/Headers -c -DFREEBSD *.c ../jk/*.c

i think the last command executed by that might fail, i can't remember. if it does, copy and paste it and add -ldl or something. Here's someone else's instructions, too, just for good measure:
Tomcat Installation Instructions for Jakarta-Tomcat version 3.2.1 and Mac OS X Pulic Beta...

1. Unpack the tomcat source and change the root directory to a name of your choice. I have made the root directory /Local/Library/Tomcat. For the remainder of this document, we will assume $TOMCAT_HOME is set to the installation root.


================================================== ============
INSTRUCTIONS FOR GETTING TOMCAT TO RUN WITH APACHE VIA MOD_JK
================================================== ============

1. For some reason, the source code for the mod_jk.so module is missing from the production release (version 3.2.1) of Tomcat, so we will have to find a more recent release. Find the SOURCE package for Tomcat 3.3 and unpack it wherever you wish. (You can put this in a temporary directory ie. under your home directory if you wish. You won't need any of it after these steps are complete.

2. Get http://fink.sourceforge.net/files/dl...0010123.tar.gz and unpack it anywhere. Enter the directory, change to root (via "su" is fine) and type "make install".

3. Once last thing before you can now delete the directory. Copy the file dlopen.c to Tomcat source (version 3.3) directory src/native/mod_jk/apache1.3 (mentioned in the next step)

Note: this step should HOPEFULLY be unnecessary once the final release of OS X is out.

4. In the Tomcat 3.3 source directory, go into src/native/mod_jk/apache1.3 and execute (as root)...

/usr/sbin/apxs -o mod_jk.so -I../common -I/System/Library/Frameworks/JavaVM.framework/Headers -I. -DFREEBSD -c mod_jk.c ../common/*.c dlopen.c

5. Now assuming you get no errors, there will be a file called mod_jk.so which you will copy to /System/Library/Apache/Modules

6. Before you proceed with this step, make sure you have started Tomcat successfully at least once. You will need to make sure there s a file called $TOMCAT_HOME/conf/mod_jk.conf-auto. This file will get auto-regenerated every time Tomcat starts up, and it will instruct Apache as to which (static) pages to handle itself and more specifically, which requests (servlets and JSP and XML) to pass over to Tomcat. There is one small glitch that we need to fix: this file instructs Apache to look for mod_jk.so in a directory that doesn't exist. We shall therefore have to create a symlink to redirect it to the correct place.

(As root) execute the following command:

ln -sf /System/Library/Apache/Modules /Library/WebServer/libexec

7. Next, edit the file /Library/WebServer/Configuration/apache.conf and append the the very last line....

Include /Local/Library/Tomcat/conf/mod_jk.conf-auto

(or replace "/Local/Library/Tomcat" with whatever you have as your $TOMCAT_HOME)

8. Let's try everything out! Startup Tomcat again if you haven't already. Then shutdown and restart apache via...

/usr/sbin/apachectl restart

and hope you get no errors!!

Now, test Apache normally by browsing http://localhost/.

If that works, now try http://localhost/examples/servlets/index.html and try to execute some of the sample servlets. If all goes well, you are done!

If you would like to enable Apache/Tomcat to serve XML files, follow my Cocoon-1.8.1 installation instructions.
     
Grizzled Veteran
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
Apr 6, 2001, 03:37 PM
 
If you are doing this on the Mac OS X 10.0 release you'll have follow slightly different instructions (at least I had to on my upgraded Apache 1.3.19 setup).

Since /System/Library/Apache/Modules is no longer used, you'll be

sudo mv mod_jk.so /usr/libexec/

instead. You can also omit step 6.

Enjoy!

------------------

Since EBCDIC
Make every post count!
Since EBCDIC
Using Macs since they were Lisas.
     
   
Thread Tools
Forum Links
Forum 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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:51 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2