mod_jk

View: New views
8 Messages — Rating Filter:   Alert me  

mod_jk

by monkeynuts84 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
   I'm having problems getting mod_jk to work. I've moved the html files to the apache webroot. When I set up mod_jk and start tomcat the site can't seem to find the search.jsp. Does anyone have a working example config for mod_jk that I can cross reference with mine?

Thanks in advance.

Parent Message unknown Re: mod_jk

by Sean Dean-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is sample (also my production copy) and I hope it helps you out a bit;
 
mod_jk.conf:
 
# Replace jsp-hostname with the hostname of your JSP server, as
# specified in workers.properties.
#
<IfModule mod_jk.c>
        JkWorkersFile etc/apache/workers.properties
        JkLogFile  /var/log/jk.log
        JkShmFile  /var/log/jk-runtime-status
        JkLogLevel error
        # Sample JkMounts.  Replace these with the paths you would
        # like to mount from your JSP server.
        #JkMount /*.jsp jsp-hostname
        #JkMount /servlet/* jsp-hostname
        #JkMount /examples/* jsp-hostname
</IfModule>

 
workers.properties:
 
# Incredibly simple workers.properties file, intended for connecting
# to one host, via AJP13.  See the tomcat documentation for
# information on more exotic configuration options.
#
# Change jsp-hostname to the hostname of your JSP server.
#
worker.list=link
worker.link.port=8009
worker.link.host=link.enhancededge.com
worker.link.type=ajp13
worker.link.lbfactor=1

 
httpd.conf (in the appropriate area):
 
<VirtualHost 216.58.87.200>
    DocumentRoot /usr/local/www/data/results.bigsearch.ca/
    ServerName results.bigsearch.ca
    JkMount /* link
    CustomLog /var/log/httpd/results.bigsearch.ca.log combined
</VirtualHost>


----- Original Message ----
From: monkeynuts84 <monkeynuts84@...>
To: nutch-user@...
Sent: Friday, August 10, 2007 6:47:12 PM
Subject: mod_jk


Hi,
   I'm having problems getting mod_jk to work. I've moved the html files to
the apache webroot. When I set up mod_jk and start tomcat the site can't
seem to find the search.jsp. Does anyone have a working example config for
mod_jk that I can cross reference with mine?

Thanks in advance.
--
View this message in context: http://www.nabble.com/mod_jk-tf4251603.html#a12100369
Sent from the Nutch - User mailing list archive at Nabble.com.

Re: mod_jk

by Hal Finkel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What kind of error page do you get: one from Tomcat or one from Apache?

 -Hal

monkeynuts84 wrote:
> Hi,
>    I'm having problems getting mod_jk to work. I've moved the html files to
> the apache webroot. When I set up mod_jk and start tomcat the site can't
> seem to find the search.jsp. Does anyone have a working example config for
> mod_jk that I can cross reference with mine?
>
> Thanks in advance.
>  


Re: mod_jk

by monkeynuts84 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hal,
    The error is from apache. It can't seem to find the jsp files. Is there something specific I need to do in the config file regarding the nutch jsp location?

Thanks.

Hal Finkel wrote:
What kind of error page do you get: one from Tomcat or one from Apache?

 -Hal

monkeynuts84 wrote:
> Hi,
>    I'm having problems getting mod_jk to work. I've moved the html files to
> the apache webroot. When I set up mod_jk and start tomcat the site can't
> seem to find the search.jsp. Does anyone have a working example config for
> mod_jk that I can cross reference with mine?
>
> Thanks in advance.
>  

Re: mod_jk

by Hal Finkel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In my setup, I do not have nutch installed in the tomcat root, instead
it is in /search. IIRC, without doing some additional fiddling, both
apache and tomcat must agree on the path to the web application. In my
case, that means that both Apache and Tomcat must believe that the
webapp is in /search. For that kind of setup, I have the following in my
Apache config:

LoadModule      jk_module modules/mod_jk.so
JkWorkersFile   /etc/httpd/conf/workers.properties
JkLogFile       logs/mod_jk.log
JkLogLevel      error
JkMount /search ajp13
JkMount /search/* ajp13

note that both JkMount lines are necessary if you want Tomcat to see
requests for /search without the trailing slash.

The workers.properties has:
workers.tomcat_home=/usr/share/tomcat5
workers.java_home=/usr/java/default
ps=/
worker.list=ajp12, ajp13, jboss
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)server$(ps)libjvm.so
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr

Then, make sure that Tomcat really is listening on port 8009 on the
loopback interface (localhost).

 -Hal

monkeynuts84 wrote:

> Hal,
>     The error is from apache. It can't seem to find the jsp files. Is there
> something specific I need to do in the config file regarding the nutch jsp
> location?
>
> Thanks.
>
>
> Hal Finkel wrote:
>  
>> What kind of error page do you get: one from Tomcat or one from Apache?
>>
>>  -Hal
>>
>> monkeynuts84 wrote:
>>    
>>> Hi,
>>>    I'm having problems getting mod_jk to work. I've moved the html files
>>> to
>>> the apache webroot. When I set up mod_jk and start tomcat the site can't
>>> seem to find the search.jsp. Does anyone have a working example config
>>> for
>>> mod_jk that I can cross reference with mine?
>>>
>>> Thanks in advance.
>>>  
>>>      
>>
>>    
>
>  


Re: mod_jk

by monkeynuts84 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just one more question (this may be where I'm going wrong!): the /search directory; is that relative to your tomcat install or is it the absolute path?

Hal Finkel wrote:
In my setup, I do not have nutch installed in the tomcat root, instead
it is in /search. IIRC, without doing some additional fiddling, both
apache and tomcat must agree on the path to the web application. In my
case, that means that both Apache and Tomcat must believe that the
webapp is in /search. For that kind of setup, I have the following in my
Apache config:

LoadModule      jk_module modules/mod_jk.so
JkWorkersFile   /etc/httpd/conf/workers.properties
JkLogFile       logs/mod_jk.log
JkLogLevel      error
JkMount /search ajp13
JkMount /search/* ajp13

note that both JkMount lines are necessary if you want Tomcat to see
requests for /search without the trailing slash.

The workers.properties has:
workers.tomcat_home=/usr/share/tomcat5
workers.java_home=/usr/java/default
ps=/
worker.list=ajp12, ajp13, jboss
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)server$(ps)libjvm.so
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr

Then, make sure that Tomcat really is listening on port 8009 on the
loopback interface (localhost).

 -Hal

monkeynuts84 wrote:
> Hal,
>     The error is from apache. It can't seem to find the jsp files. Is there
> something specific I need to do in the config file regarding the nutch jsp
> location?
>
> Thanks.
>
>
> Hal Finkel wrote:
>  
>> What kind of error page do you get: one from Tomcat or one from Apache?
>>
>>  -Hal
>>
>> monkeynuts84 wrote:
>>    
>>> Hi,
>>>    I'm having problems getting mod_jk to work. I've moved the html files
>>> to
>>> the apache webroot. When I set up mod_jk and start tomcat the site can't
>>> seem to find the search.jsp. Does anyone have a working example config
>>> for
>>> mod_jk that I can cross reference with mine?
>>>
>>> Thanks in advance.
>>>  
>>>      
>>
>>    
>
>  

Re: mod_jk

by Hal Finkel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In my setup: /search is relative to the Tomcat webapps folder (from the
point of view of Apache, it is just an alias).

 -Hal

monkeynuts84 wrote:

> Just one more question (this may be where I'm going wrong!): the /search
> directory; is that relative to your tomcat install or is it the absolute
> path?
>
>
> Hal Finkel wrote:
>  
>> In my setup, I do not have nutch installed in the tomcat root, instead
>> it is in /search. IIRC, without doing some additional fiddling, both
>> apache and tomcat must agree on the path to the web application. In my
>> case, that means that both Apache and Tomcat must believe that the
>> webapp is in /search. For that kind of setup, I have the following in my
>> Apache config:
>>
>> LoadModule      jk_module modules/mod_jk.so
>> JkWorkersFile   /etc/httpd/conf/workers.properties
>> JkLogFile       logs/mod_jk.log
>> JkLogLevel      error
>> JkMount /search ajp13
>> JkMount /search/* ajp13
>>
>> note that both JkMount lines are necessary if you want Tomcat to see
>> requests for /search without the trailing slash.
>>
>> The workers.properties has:
>> workers.tomcat_home=/usr/share/tomcat5
>> workers.java_home=/usr/java/default
>> ps=/
>> worker.list=ajp12, ajp13, jboss
>> worker.ajp13.port=8009
>> worker.ajp13.host=localhost
>> worker.ajp13.type=ajp13
>> worker.ajp13.lbfactor=1
>> worker.loadbalancer.type=lb
>> worker.loadbalancer.balance_workers=ajp13
>> worker.inprocess.type=jni
>> worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
>> worker.inprocess.cmd_line=start
>> worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)server$(ps)libjvm.so
>> worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
>> worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
>>
>> Then, make sure that Tomcat really is listening on port 8009 on the
>> loopback interface (localhost).
>>
>>  -Hal
>>
>> monkeynuts84 wrote:
>>    
>>> Hal,
>>>     The error is from apache. It can't seem to find the jsp files. Is
>>> there
>>> something specific I need to do in the config file regarding the nutch
>>> jsp
>>> location?
>>>
>>> Thanks.
>>>
>>>
>>> Hal Finkel wrote:
>>>  
>>>      
>>>> What kind of error page do you get: one from Tomcat or one from Apache?
>>>>
>>>>  -Hal
>>>>
>>>> monkeynuts84 wrote:
>>>>    
>>>>        
>>>>> Hi,
>>>>>    I'm having problems getting mod_jk to work. I've moved the html
>>>>> files
>>>>> to
>>>>> the apache webroot. When I set up mod_jk and start tomcat the site
>>>>> can't
>>>>> seem to find the search.jsp. Does anyone have a working example config
>>>>> for
>>>>> mod_jk that I can cross reference with mine?
>>>>>
>>>>> Thanks in advance.
>>>>>  
>>>>>      
>>>>>          
>>>>    
>>>>        
>>>  
>>>      
>>
>>    
>
>  


Re: mod_jk

by monkeynuts84 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I see. That's probably where I've gone wrong. My nutch folders absolute path is /data.

Hal Finkel wrote:
In my setup: /search is relative to the Tomcat webapps folder (from the
point of view of Apache, it is just an alias).

 -Hal

monkeynuts84 wrote:
> Just one more question (this may be where I'm going wrong!): the /search
> directory; is that relative to your tomcat install or is it the absolute
> path?
>
>
> Hal Finkel wrote:
>  
>> In my setup, I do not have nutch installed in the tomcat root, instead
>> it is in /search. IIRC, without doing some additional fiddling, both
>> apache and tomcat must agree on the path to the web application. In my
>> case, that means that both Apache and Tomcat must believe that the
>> webapp is in /search. For that kind of setup, I have the following in my
>> Apache config:
>>
>> LoadModule      jk_module modules/mod_jk.so
>> JkWorkersFile   /etc/httpd/conf/workers.properties
>> JkLogFile       logs/mod_jk.log
>> JkLogLevel      error
>> JkMount /search ajp13
>> JkMount /search/* ajp13
>>
>> note that both JkMount lines are necessary if you want Tomcat to see
>> requests for /search without the trailing slash.
>>
>> The workers.properties has:
>> workers.tomcat_home=/usr/share/tomcat5
>> workers.java_home=/usr/java/default
>> ps=/
>> worker.list=ajp12, ajp13, jboss
>> worker.ajp13.port=8009
>> worker.ajp13.host=localhost
>> worker.ajp13.type=ajp13
>> worker.ajp13.lbfactor=1
>> worker.loadbalancer.type=lb
>> worker.loadbalancer.balance_workers=ajp13
>> worker.inprocess.type=jni
>> worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
>> worker.inprocess.cmd_line=start
>> worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)server$(ps)libjvm.so
>> worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
>> worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
>>
>> Then, make sure that Tomcat really is listening on port 8009 on the
>> loopback interface (localhost).
>>
>>  -Hal
>>
>> monkeynuts84 wrote:
>>    
>>> Hal,
>>>     The error is from apache. It can't seem to find the jsp files. Is
>>> there
>>> something specific I need to do in the config file regarding the nutch
>>> jsp
>>> location?
>>>
>>> Thanks.
>>>
>>>
>>> Hal Finkel wrote:
>>>  
>>>      
>>>> What kind of error page do you get: one from Tomcat or one from Apache?
>>>>
>>>>  -Hal
>>>>
>>>> monkeynuts84 wrote:
>>>>    
>>>>        
>>>>> Hi,
>>>>>    I'm having problems getting mod_jk to work. I've moved the html
>>>>> files
>>>>> to
>>>>> the apache webroot. When I set up mod_jk and start tomcat the site
>>>>> can't
>>>>> seem to find the search.jsp. Does anyone have a working example config
>>>>> for
>>>>> mod_jk that I can cross reference with mine?
>>>>>
>>>>> Thanks in advance.
>>>>>  
>>>>>      
>>>>>          
>>>>    
>>>>        
>>>  
>>>      
>>
>>    
>
>