LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Intergating apache and tomcat with jk_mod.so (http://www.linuxquestions.org/questions/linux-software-2/intergating-apache-and-tomcat-with-jk_mod-so-899522/)

bittus 08-26-2011 01:14 AM

Intergating apache and tomcat with jk_mod.so
 
I am trying to integrate Apache 2.2.8 and Tomcat 6.0.33

The steps that I have done.
  1. Downloaded and compiled mod_jk
  2. Edited the worker.properties file like :

    worker.list=worker1
    worker.worker1.type=ajp13
    worker.worker1.host=localhost
    worker.worker1.port=8009
  3. Edited the httpd.conf
    LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
    JkWorkersFile /etc/httpd/conf/workers.properties
    JkShmFile /var/log/httpd/mod_jk.shm
    JkLogFile /var/log/httpd/mod_jk.log
    JkLogLevel info
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    JkMount /examples/* worker1

As per the configuration, if I try http://localhost/examples, I should be getting the tomcat apllication. Instead, I get a message "File does not exist: /var/www/html/ABC/examples" in the httpd error_log.

Anyone, any clue on this

bathory 08-26-2011 04:35 AM

Quote:

As per the configuration, if I try http://localhost/examples, I should be getting the tomcat apllication. Instead, I get a message "File does not exist: /var/www/html/ABC/examples" in the httpd error_log.
Shouldn't that be /var/www/html/examples

bittus 08-26-2011 11:21 AM

Quote:

Originally Posted by bathory (Post 4453884)
Shouldn't that be /var/www/html/examples

@bathory /var/www/html/ABC is my doucument root.

bathory 08-26-2011 12:15 PM

What is your distro?
I guess from the docroot path, that it's RHEL based. If that's the case I would suspect a selinux permissions problem.

Regards

bittus 08-28-2011 01:08 AM

Quote:

Originally Posted by bathory (Post 4454241)
What is your distro?
I guess from the docroot path, that it's RHEL based. If that's the case I would suspect a selinux permissions problem.

Regards

@bathory
Your are right. It's RHEL based.
Do you have any idea of the required SElinux context ?

bathory 08-28-2011 03:17 AM

Hi,

I'm not a rhel fan, so I know little about selinux. Anyway you should try to disable it temporarily and see if that's the case. Run
Code:

setenforce 0
and check.
If it's selinux, relabel the docroot as in the example here.

Regards

bittus 08-31-2011 12:37 AM

Quote:

Originally Posted by bathory (Post 4455292)
Hi,

I'm not a rhel fan, so I know little about selinux. Anyway you should try to disable it temporarily and see if that's the case. Run
Code:

setenforce 0
and check.
If it's selinux, relabel the docroot as in the example here.

Regards

@bathory,
Thanks for the feedback and sorry for the late update.
I was wondering how I missed, SElinux is disabled on the server. So that should not be the issue :(

I will brief my requirement again.
Now, in order to reach the tomcat service we should type in http://192.168.1.102:4455/examples/m...1034&room=chat
I would like to access the service by just typing in http://www.mydomain.com/tc/examples/...1034&room=chat

Any suggestions are welcome.

I would also like to know, if mod_rewrite will help !!!

bathory 08-31-2011 02:59 AM

Hi,

You can use mod_proxy or mod_proxy ajp for this.
Take a look at this howto for details.

Regards

bittus 09-02-2011 01:43 AM

Quote:

Originally Posted by bathory (Post 4457718)
Hi,

You can use mod_proxy or mod_proxy ajp for this.
Take a look at this howto for details.

Regards

@bathory
Thats a well explained tutorial. And that worked for me finally :)
Thanks a lot.


All times are GMT -5. The time now is 06:23 AM.