tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: URI mapping
Date Sat, 22 Oct 2011 19:28:48 GMT
Hi.

What response ? to what question ?

Top-posting makes it difficult to follow the flow of questions/answers.
Mark's response was at the bottom, where it was logically following the part of the 
question he was answering.  Once it has started that way, it is a lot easier for everyone

to continue the same way.
See next message.

Eldon Olmstead wrote:
> Thanks for the response Mark,
> 
> Ok so if I want to keep mod_jk as part of this, ( it is what we use at 
> work ), then if I understand right, I have no choice but to make tomcat 
> support /tomcat7/ in the path. Do I do this just by moving all the 
> webapps under webapps/tomcat7/? Will I have to make other configuration 
> changes?
> 
> What is the right way to do this? The way we have it at work is that 
> each tomcat worker is pointing to one developer's tomcat installation 
> for the developer to do with as they need.
> 
> On 2011-10-22 1:17 PM, Mark Thomas wrote:
>> On 22/10/2011 17:11, Eldon Olmstead wrote:
>>> Hello,
>>>
>>> I'm using the following
>>> Apache2.2
>>> mod_jk 1.2.32
>>> Tomcat 7.0.21
>>>
>>> I am trying to understand how to configure Apache to allow access to
>>> Tomcat via mod_jk. I have already made some progress, but have got stuck
>>> on one point.
>>>
>>> Currently, I can access Apache at http://localhost ( works )
>>> I can also access tomcats default wepapp and the manager and
>>> host-manager via
>>>
>>> http://localhost:8080/
>>> http://localhost:8080/manager
>>> http://localhost:8080/host-manager
>>>
>>>
>>> What I want to do next it to connect Apache to Tomcat via mod_jk such
>>> that the following URLs work
>>>
>>> http://localhost/tomcat7/ ( default tomcat webapp)
>>> http://localhost/tomcat7/manager
>>> http://localhost/tomcat7/host-manager
>>>
>>>
>>> I have updated the workers.properties with:
>>>
>>>     worker.list=tomcat7
>>>     worker.tomcat7.type=ajp13
>>>     worker.tomcat7.host=localhost
>>>     worker.tomcat7.port=8809
>>>
>>> I have added the the following in my http-jk.conf that I include in
>>> http.conf:
>>>
>>>     JkMount  /tomcat7/* tomcat7
>>>
>>> When I try to access http://localhost/tomcat7, tomcat is given the URI
>>> /tomcat7/
>>>
>>>     127.0.0.1 - - [22/Oct/2011:11:34:20 -0300] "GET /tomcat7/ HTTP/1.1"
>>>     404 979
>>>
>>> So from the above log, I know that apache is forwarding the requests to
>>> tomcat via mod_jk ok, but tomcat now thinks that /tomcat7/ is now part
>>> of the request and since there is no tomcat7 web app, it doesn't match
>>> the request.
>>>
>>> I would like http://localhost/tomcat7/ to map to the root of my Tomcat,
>>> and to be able to access http://localhost/tomcat7/manager,
>>> http://localhost/tomcat7/host-manager.
>>>
>>> What do I do next?
>> If you want to modify the URL, you'll need to use mod_proxy. Then you
>> can do:
>>
>> ProxyPass /tomcat7 http://localhost:8080
>> or
>> ProxyPass /tomcat7 ajp://localhost:8080
>>
>> Note that as soon as you start modifying the URL as part of the
>> ProxyPass you open up a world of opportunity for things to go wrong
>> (redirects, cookie paths, links). All of these are fixable but it is a
>> lot easier just to use the same URL structure in both httpd and Tomcat.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@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