Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-03-2011, 12:49 PM
|
#1
|
|
Member
Registered: Nov 2009
Posts: 43
Rep:
|
How to run Apache on one server and connect to Tomcat on another?
Right now I have Apache and Tomcat running on the same server. For reasons I won't go into I'm experimenting with putting Apache on a separate server, and installing Tomcat on multiple back-end servers. This isn't a load-balancing scenario as each Tomcat container on the back-end servers will be providing a separate application/responding to a different url.
In a typical setup (everything on one box) the configuration file (we use workers.properties)sets what appears to be parameters such as the location of tomcat and Java. For example, here is the current output of workers.properties:
Quote:
workers.tomcat_home=/usr/share/tomcat6/
workers.java_home=/usr/lib/jvm/default-java
ps=/
worker.list=worker1,worker2
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
worker.worker2.port=8109
worker.worker2.host=localhost
worker.worker2.type=ajp13
|
Do I need the content in red? If so, can I point those values to installations on another server, or do I need to actually install Tomcat and Java on the Apache server still? That seems silly since I'm trying to separate them, but I'm just not sure.
|
|
|
|
01-03-2011, 01:12 PM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,830
|
workers.properties is solely a config file for tomcat, it has nothing to do with apache at all. to contact the to, you'd generally just use mod_proxy, or mod_jk.
|
|
|
|
01-03-2011, 01:42 PM
|
#3
|
|
Member
Registered: Nov 2009
Posts: 43
Original Poster
Rep:
|
I'm a little confused. I know you have to use mod_jk or mod_proxy to allow Apache to use the AJP protocol that Tomcat uses, and I'm actually using mod_jk in my setup. Are you saying that what's in the workers.properties file is only important to Tomcat and not Apache at all? I have a line in httpd.conf, JkWorkersFile, pointing to /etc/apache2/workers.properties. Since workers.properties is the file that plots out the location of Java and Tomcat, and is not important to Apache, does this mean I can actually relocate this file to the Tomcat server and change the JkWorkersFile directive to point to this remote location?
My apologies...I forgot my basics:
Server1: Apache/2.2.14, "Ubuntu 10.04.1 LTS" x64
Server2: Apache Tomcat/6.0.24, Ubuntu 10.04.1 LTS x64, java version "1.6.0_20"
Last edited by Subject16; 01-03-2011 at 01:44 PM.
Reason: Config info
|
|
|
|
01-03-2011, 01:53 PM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,830
|
Sometimes I find it a lot better to admit I'm wrong than backtrack... probably not as often as I should :-) I just use proxypass, so don't have much exposure to jk.
OK, so the workers config file on apache is for mod_jk directly, so no you don't need tomcat itself on the apache side. As for the need for all options, if you don't it'll be harmless, if you and do remove them, you'll know pretty quickly when it doesn't work any more.
|
|
|
1 members found this post helpful.
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:20 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|