|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Mod_JK on OSX server 10.5Hi Folks,
Wondered if someone could help me with ideas on this? Have a configuration where a separate tomcat instance is installed (So apple can't break it :)). Apple's copy of tomcat provided with the machine in not running. The new Tomcat (5.5.7) plays fine on port 8080. i.e. http://localhost:8080/index.jsp We want to move to using apache 2.2 with mod_jk to hand off URI's appropriately to tomcat. Have worked through the material in http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html The mod_jk apache module provided with Apple's 10.5 server is enabled. Added listener to the engine element of server.xml <Listener className="org.apache.jk.config.ApacheConfig" modJK="/usr/libexec/apache2/mod_jk.so" /> The default workers properties file was looked over and edited.... I tweaked the default workers.properties. Here is some of the file content: # Normaly all you will need to do is un-comment and modify the first three # properties, i.e. workers.tomcat_home, workers.java_home and ps. # Most of the configuration is derived from these. # # When you are done updating workers.tomcat_home, workers.java_home and ps # you should have 3 workers configured: # # - An ajp12 worker that connects to localhost:8007 # - An ajp13 worker that connects to localhost:8009 # - A jni inprocess worker. # - A load balancer worker # # However by default the plugins will only use the ajp12 worker. To have # the plugins use other workers you should modify the worker.list property. # # I did this: workers.tomcat_home=/Applications/Qilan\ 3/Tomcat_Qilan #note below is the symlink recommended by Apple in technical QA1170 pgm workers.java_home=/Library/Java/Home but it was not clear to me what should be changed on worker.list. Left as is, to wit #------ DEFAULT worket list ------------------------------------------ #--------------------------------------------------------------------- # # # The workers that your plugins should create and work with # # Add 'inprocess' if you want JNI connector worker.list=ajp12, ajp13 # , inprocess --- Added listener to the engine element of server.xml <Listener className="org.apache.jk.config.ApacheConfig" modJK="/usr/libexec/apache2/mod_jk.so" /> Restarted Tomcat and mod_jk.conf was generated along with the auto directory and so on. Got the Include in Apache 2.2 httpd.conf pointing to mod_jk.conf squared away enough so that Apache starts OK. The include originally errored apache when I tried to backslash to escape the space between Qilan and 3. The below seems to work without an error Include "/Applications/Qilan 3/Tomcat_Qilan/conf/auto/mod_jk.conf" The mod_jk apache module provided with 10.5 server is enabled. I port scanned the machine to check that there is a response from port 8009. This would appear to indicate that the ajp13 worker is playing correctly as defined in workers properties. I just can't seem to get the handoff to happen for URI's that should parse out to be handed to tomcat. All the other tutorial info I have located seems way too dated. Specifically what I see when I test http://localhost/index.jsp: Forbidden You don't have permission to access /index.jsp on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7l PHP/5.2.5 mod_jk/1.2.23 Server at localhost Port 80 I do see one console error when I start Apache: 4/8/08 10:35:36 PM org.apache.httpd[84287] [Tue Apr 08 22:35:36 2008] [warn] VirtualHost localhost:0 overlaps with VirtualHost localhost:0, the first has precedence, perhaps you need a NameVirtualHost directive I keep thinking my httpd.conf include is not working properly, but I ran out of ideas on how to modify it without an Apache error. Would appreciate any thoughts... Phil Mc Phil McNamara CommonGround Softworks Inc. info@... http://www.commongrnd.com --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Mod_JK on OSX server 10.5> From: CommonGround Softworks/Phil McNamara
> [mailto:Phil@...] > Subject: Mod_JK on OSX server 10.5 > > The new Tomcat (5.5.7) plays fine on port 8080. Why are you using such an old level? That's nearly three years old. > We want to move to using apache 2.2 with mod_jk to hand off URI's > appropriately to tomcat. Why do you want to do that? Modern versions of Tomcat are more than adequate for serving static content, so unless you have a real need for httpd, don't make your life more complicated than it needs to be. If you just want Tomcat to be accessible on ports 80 and 443, change the <Connector> settings in conf/server.xml. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
|
|
|
RE: Mod_JK on OSX server 10.5> From: CommonGround Softworks/Phil McNamara
> [mailto:Phil@...] > Subject: RE: Mod_JK on OSX server 10.5 > > In OSX, IIRC, there were the usual issues because > the ports less than 1024 are reserved for priviledged > services Which is exactly why jsvc (now commonds-daemon) was invented. It's a whole lot simpler than httpd. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
|
|
|
RE: Mod_JK on OSX server 10.5> From: CommonGround Softworks/Phil McNamara
> [mailto:Phil@...] > Subject: RE: Mod_JK on OSX server 10.5 > > Thanks. I found this: > http://commons-daemon.darwinports.com/ Why not look at the real doc? http://commons.apache.org/daemon/ - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
|
|
|
Re: Mod_JK on OSX server 10.5CommonGround Softworks/Phil McNamara schrieb:
> Hi Folks, > Wondered if someone could help me with ideas on this? > > Have a configuration where a separate tomcat instance is installed (So > apple can't break it :)). Apple's copy of tomcat provided with the > machine in not running. The new Tomcat (5.5.7) plays fine on port 8080. > i.e. As mentioned by others: 5.5.7 is *very old*. > http://localhost:8080/index.jsp > > We want to move to using apache 2.2 with mod_jk to hand off URI's > appropriately to tomcat. > Have worked through the material in > http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html > > The mod_jk apache module provided with Apple's 10.5 server is enabled. > > Added listener to the engine element of server.xml > > <Listener className="org.apache.jk.config.ApacheConfig" > modJK="/usr/libexec/apache2/mod_jk.so" /> Once you have your final configuration, this isn't needed any more. It's only used to produce a simple basic mod_jk configuration. Tomcat doesn't use the file by itself, instead the generated file needs to be put into the httpd configuration. The generated file is only a very simple default. > The default workers properties file was looked over and edited.... > > I tweaked the default workers.properties. Here is some of the file > content: > > # Normaly all you will need to do is un-comment and modify the first three > # properties, i.e. workers.tomcat_home, workers.java_home and ps. > # Most of the configuration is derived from these. > # > # When you are done updating workers.tomcat_home, workers.java_home and ps > # you should have 3 workers configured: > # > # - An ajp12 worker that connects to localhost:8007 > # - An ajp13 worker that connects to localhost:8009 > # - A jni inprocess worker. > # - A load balancer worker > # > # However by default the plugins will only use the ajp12 worker. To have > # the plugins use other workers you should modify the worker.list > property. > # > # These are only comments. > I did this: > > > workers.tomcat_home=/Applications/Qilan\ 3/Tomcat_Qilan > #note below is the symlink recommended by Apple in technical QA1170 pgm > workers.java_home=/Library/Java/Home Those two don't do anything useful any more. The auto-generation is very outdated, it produces several non-functional configuration lines (although they don't technically harm) > > but it was not clear to me what should be changed on worker.list. Left > as is, to wit > > #------ DEFAULT worket list ------------------------------------------ > #--------------------------------------------------------------------- > # > # > # The workers that your plugins should create and work with > # > # Add 'inprocess' if you want JNI connector > worker.list=ajp12, ajp13 The worker.list contains a comma-separated list of your worker names. Worker names can be freely chosen (no special chars allowed). I would suggest for a simple configuration remove "ajp12" and keep "ajp13". If your worker is not defined in workers.properties (lines of the form worker.ajp13.XXX=YYY), then it defaults to localhost port 8009 and protocol ajp13. This might be fine in your case, but I would suggest to do an explicit definition of the worker. > # , inprocess > > --- > > > Added listener to the engine element of server.xml > <Listener className="org.apache.jk.config.ApacheConfig" > modJK="/usr/libexec/apache2/mod_jk.so" /> Once again? > Restarted Tomcat and mod_jk.conf was generated along with the auto > directory and so on. And so on? What are the contents of the mod_jk.conf??? > Got the Include in Apache 2.2 httpd.conf pointing to mod_jk.conf squared > away enough so that Apache starts OK. The include originally errored > apache when I tried to backslash to escape the space between Qilan and 3. > The below seems to work without an error > > Include "/Applications/Qilan 3/Tomcat_Qilan/conf/auto/mod_jk.conf" Yes, path with spaces ... > The mod_jk apache module provided with 10.5 server is enabled. Which version of mod_jk? > I port scanned the machine to check that there is a response from port > 8009. > This would appear to indicate that the ajp13 worker is playing correctly > as defined in workers properties. > > I just can't seem to get the handoff to happen for URI's that should > parse out to be > handed to tomcat. > All the other tutorial info I have located seems way too dated. > > Specifically what I see when I test http://localhost/index.jsp: > > Forbidden > You don't have permission to access /index.jsp on this server. > Additionally, a 403 Forbidden error was encountered while trying to use > an ErrorDocument to handle the request. > > Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7l PHP/5.2.5 mod_jk/1.2.23 > Server at localhost Port 80 Aha, so it's mod_jk 1.2.23. > I do see one console error when I start Apache: > > 4/8/08 10:35:36 PM org.apache.httpd[84287] [Tue Apr 08 22:35:36 2008] > [warn] VirtualHost localhost:0 overlaps with VirtualHost localhost:0, the > first has precedence, perhaps you need a NameVirtualHost directive > > I keep thinking my httpd.conf include is not working properly, but I ran > out of ideas on how to modify it without an Apache error. > > Would appreciate any thoughts... Not without the contents of mod_jk.conf :( You can get a little more info by setting JkLogfLevel to debug and then start httpd and do a single request, which should get forwarded to Tomcat, but which does not work. Regards, Rainer --------------------------------------------------------------------- To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |