tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Force Apache to drop port 8080 when forwarding to Tomcat 6.0.10 using mod_jk-1.2.22
Date Fri, 20 Apr 2007 23:05:49 GMT

Hi Khalil,

I cant see anything wrong off hand, and I cant think of how this 
configuration can cause this behaviour...
The only way I can see this happening is that there is an HTML page in 
apache that is redirecting to 8080
Or if the programmer who made the webApp did a redirect to another page in 
tomcat and hard coded the port....

For any of this to even work there must still be a connector in tomcat set 
to 8080 (server.xml) for direct access to tomcat.

First change that connector to another free port say 8081 (if that is free) 
and run tomcat by itself... ie http://whatever:8081
If it breaks.... you have found your problem in tomcat...

If it still works as tomcat standalone.... then take the 8080 connector out 
completely
Then if the apache complains you will probably find the offending web 
page...

Otherwise what you are saying is actually impossible.... as you can see 
apache is talking to tomcat on port 8009... and even then the incoming url 
has to be set to 8080.... so I'm thinking someone new to tomcat thought they 
had to redirect to 8080, and didnt understand the connectors and actually 
redirected a web page to 8080.

Have fun

----- Original Message ----- 
From: "Khalil" <khalil-k@comcast.net>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Friday, April 20, 2007 10:09 PM
Subject: Force Apache to drop port 8080 when forwarding to Tomcat 6.0.10 
using mod_jk-1.2.22


Hi,

I am trying to integrate Tomcat 6.0.10 with Apache 2.2.4 using 
mod_jk-1.2.22. The traffic seems to be flowing correctly to Tomcat on port 
8080 from apache through the connector. Tomcat and Apache reside on the same 
machine.

I want to force apache to drop prot 8080 form the url when it forwards to 
tomcat since we're behined a firewall and port 8080 is closed.

For example, when I type in the browser: http://somehost/match2020/  apache 
forwadrs to tomcat and the url is changed to http://somhost:8080/match2020/. 
I want to get rid of 8080 form the url and just be on port 80.
.

I have read and re-read the docs on http://tomcat.apache.org/connectors-doc 
and googled for few hours now but I am just unable to do it. I must be 
missing something?

Here is what I have done:

I have placed these lines in apache's httpd.conf:

LoadModule jk_module modules/mod_jk.so
JkWorkersFile "C:\Program Files\Apache Software 
Foundation\Apache2.2\conf\workers.properties"
JkLogFile "C:\Program Files\Apache Software 
Foundation\Apache2.2\logs\mod_jk.log"
JkLogLevel info
<VirtualHost ip_address:80>
    JkMount /* loadbalancer
    JkMount /match2020 loadbalancer
    JkMount /match2020/* loadbalancer
</VirtualHost>

Workers.properties file looks like this:

worker.list=loadbalancer
# First tomcat server
# ------------------------
worker.tomcat1.port=8009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=1
worker.loadbalancer.balance_workers=tomcat1
#worker.loadbalancer.balance_workers=tomcat2, tomcat4, tomcat1, tomcat3

I added the following connector to server.xml in Tomcat

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" 
enableLookups="true"/>

Regards
Khalil 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message