Re: JkMount and Apache Rewrite

2010-05-17 Thread Rainer Jung

On 26.04.2010 13:56, Philip Hunt (Straker Software) wrote:

Hi,

I have the following config, to pass requests through Apache to Tomcat using
AJP:

RewriteEngine on
RewriteRule ^/abc - [L,PT]
RewriteRule (.*) /abc$1 [L,PT]

JkMount /abc/* node1

This works, to the point that requests to http://sitename/ are rewritten to
http://sitename/abc ... and the JkMount directive finds a match, and passes
the request off to a worker.

However, I need JkMount to preserve the rewritten URI and it doesn't appear
to be doing that.

A request to http://sitename/ gets rewritten to http://sitename/abc ... but,
goes to the worker as http://sitename/

Does anyone know how I can preserve the rewritten URI when passing to the
worker?


Look at the Forwarding section in:

http://tomcat.apache.org/connectors-doc/reference/apache.html

and also at

http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html

It could be you copied an outdated default configuration setting an 
exotic JkOption. With modern releases (actual: 1.2.30) you should no 
longer need a Forward-JkOption.


Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JkMount for status working not getting triggered

2009-10-16 Thread Rainer Jung
On 15.10.2009 17:39, Christopher Schultz wrote:
 Neil,
 
 On 10/14/2009 10:43 PM, Neil Aggarwal wrote:
 I then added this to my httpd.conf file in the global directives:
 
 # Mount the jk status application
 Location /jkstatus
   JkMount jkstatus
   Order allow,deny
   Allow from all
 /Location
 
 Try replacing the above with:
 
 JkMount /jkstatus jkstatus
 
 What you have is documented to work, but it's apparently not working.

I don't know what version he is using, but in general it does work.

 Another think you might need to do is move either your or my
 configuration into the VirtualHost being used when the request is
 serviced: JkMounts are not automatically copied into virtual hosts.

Assuming this is the culprit. Quick fix if people don't know about
VirtualHost: add JkMountCopy All.

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JkMount for status working not getting triggered

2009-10-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Neil,

On 10/14/2009 10:43 PM, Neil Aggarwal wrote:
 I then added this to my httpd.conf file in the global directives:
 
 # Mount the jk status application
 Location /jkstatus
   JkMount jkstatus
   Order allow,deny
   Allow from all
 /Location

Try replacing the above with:

JkMount /jkstatus jkstatus

What you have is documented to work, but it's apparently not working.

Another think you might need to do is move either your or my
configuration into the VirtualHost being used when the request is
serviced: JkMounts are not automatically copied into virtual hosts.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrXQh8ACgkQ9CaO5/Lv0PBmGQCcCxWa2hhtsmgOczCyYTNpUcYX
lzQAnR3DNMQC6RZDHNL6B3Mj0G2iXKHm
=u15T
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: JkMount for status working not getting triggered

2009-10-15 Thread Neil Aggarwal
Chris:

That worked.  

Thanks for the help,
Neil

--
Neil Aggarwal, (281)846-8957, www.JAMMConsulting.com
Will your e-commerce site go offline if you have
a DB server failure, fiber cut, flood, fire, or other disaster?
If so, ask about our geographically redundant database system. 

 Try replacing the above with:
 JkMount /jkstatus jkstatus


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JkMount a different location

2009-03-02 Thread Rainer Jung

On 02.03.2009 03:21, Andres Riancho wrote:

List,

 I've search the Tomcat FAQ, but I haven't been able to find any
answers, so... here is my question... I have a JSP application
deployed in Tomcat inside the /abc/ directory; and I want to be able
to access it from *two different locations* from Apache, for example,
when I access: http://apache/abc/; and http://apache/123/abc/;. The
first JkMount is trivial:

 JkMount /abc ajp13_worker
 JkMount /abc/* ajp13_worker

 And is working as expected, but for the second... I don't have the
slightest clue on how to do it... I tried mod_rewrite, but it seems
that it isn't possible to combine JkMount's and URL rewrites in a
successful way. Could anyone point me in the right direction? Thanks!

 I'm using Apache2, Tomcat6.


I'll give an answer for Apache 2.2 and yes, this is missing in the 
documentation at the moment. For IIS there is a builtin rewrite feature 
in mod_jk, but not for httpd, because httpd can already do it on its own.


Context rewriting for mod_jk and Apache httpd
=

Tested with httpd 2.2.11.

You need to handle three things:

1) Rewrite the URL /xxx/something to /yyy/something before the request 
gets send to Tomcat


2) Change any redirects you get back from Tomcat, which point to 
locations /yyy/somethingelse, into location /xxx/somethingelse


3) Change pathes of cookies, which might get set by the application from 
/yyy to /xxx.


The module mod_proxy allow sto do this via ProxyPass, ProxyPassReverse 
and ProxyPassReverseCookiePath directives. But you can't use mod_proxy 
and mod_jk for the same requests.


The first directive can be replaced by some RewriteRule, the other two 
cases will be handled by dynamically changing response headers.


So lets start with

JkMount /yyy/* myworker

and now:

ad 1) RewriteRule ^/xxx/(.*)$ /yyy/$1 [PT]

This will change any rquest /xxx/something into /yyy/something before 
passing it to mod_jk.


ad 2) Header edit Location ^([^/]*//[^/]*)?/yyy/(.*)$ $1/xxx/$2

This changes Location headers, the headers used for signalling a 
redirect to the client.


Any URL of the form protocol://server:port/yyy/something will be 
changed (yyy - xxx), as well as URLs of the form /yyy/something.


Happy regular expression studying.

ad 3) Header edit Set-Cookie ^(.*; Path=)/yyy([/;].*)?$ $1/xxx$2

This changes Set-Cookie headers, the headers used for setting a cookie.

I hope you get the idea.

In case your webapp puts self referential links into he response pages 
themselves, things get more complicated (or say: more expensive in terms 
of CPU cycles). Then you must parse the complete response pages to do 
search and replace. You can do that e.g. with mod_substitute or mod_sed 
or mod_proxy_html.


It seems it would be nice, mod_jk had short hand notations for 1)-3). 
You can file an enhancement request in bugzilla for this, if you like.


Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JkMount a different location

2009-03-02 Thread Andres Riancho
Rainer,

On Mon, Mar 2, 2009 at 12:29 PM, Rainer Jung rainer.j...@kippdata.de wrote:
 On 02.03.2009 03:21, Andres Riancho wrote:

 List,

     I've search the Tomcat FAQ, but I haven't been able to find any
 answers, so... here is my question... I have a JSP application
 deployed in Tomcat inside the /abc/ directory; and I want to be able
 to access it from *two different locations* from Apache, for example,
 when I access: http://apache/abc/; and http://apache/123/abc/;. The
 first JkMount is trivial:

         JkMount /abc ajp13_worker
         JkMount /abc/* ajp13_worker

     And is working as expected, but for the second... I don't have the
 slightest clue on how to do it... I tried mod_rewrite, but it seems
 that it isn't possible to combine JkMount's and URL rewrites in a
 successful way. Could anyone point me in the right direction? Thanks!

     I'm using Apache2, Tomcat6.

 I'll give an answer for Apache 2.2 and yes, this is missing in the
 documentation at the moment. For IIS there is a builtin rewrite feature in
 mod_jk, but not for httpd, because httpd can already do it on its own.

 Context rewriting for mod_jk and Apache httpd
 =

 Tested with httpd 2.2.11.

 You need to handle three things:

 1) Rewrite the URL /xxx/something to /yyy/something before the request gets
 send to Tomcat

 2) Change any redirects you get back from Tomcat, which point to locations
 /yyy/somethingelse, into location /xxx/somethingelse

 3) Change pathes of cookies, which might get set by the application from
 /yyy to /xxx.

 The module mod_proxy allow sto do this via ProxyPass, ProxyPassReverse and
 ProxyPassReverseCookiePath directives. But you can't use mod_proxy and
 mod_jk for the same requests.

 The first directive can be replaced by some RewriteRule, the other two cases
 will be handled by dynamically changing response headers.

 So lets start with

 JkMount /yyy/* myworker

 and now:

 ad 1) RewriteRule ^/xxx/(.*)$ /yyy/$1 [PT]

 This will change any rquest /xxx/something into /yyy/something before
 passing it to mod_jk.

 ad 2) Header edit Location ^([^/]*//[^/]*)?/yyy/(.*)$ $1/xxx/$2

 This changes Location headers, the headers used for signalling a redirect to
 the client.

 Any URL of the form protocol://server:port/yyy/something will be changed
 (yyy - xxx), as well as URLs of the form /yyy/something.

 Happy regular expression studying.

 ad 3) Header edit Set-Cookie ^(.*; Path=)/yyy([/;].*)?$ $1/xxx$2

 This changes Set-Cookie headers, the headers used for setting a cookie.

 I hope you get the idea.

I got the idea, and I was able to successfully implement it. I was
going in the right direction with the RewriteRule stuff, I actually
wrote something like:

RewriteRule ^/xxx/(.*)$ /yyy/$1

Myself, but the *most important* thing, that allows you to rewrite and
use mod_jk is the [PT] flags for the rule!

RewriteRule ^/xxx/(.*)$ /yyy/$1 [PT]


 In case your webapp puts self referential links into he response pages
 themselves, things get more complicated (or say: more expensive in terms of
 CPU cycles). Then you must parse the complete response pages to do search
 and replace. You can do that e.g. with mod_substitute or mod_sed or
 mod_proxy_html.

 It seems it would be nice, mod_jk had short hand notations for 1)-3). You
 can file an enhancement request in bugzilla for this, if you like.

Yes, I truly think that mod_jk needs to address this on its own.

Thank you very much for your help,

Cheers,

 Regards,

 Rainer

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





-- 
Andrés Riancho
http://www.bonsai-sec.com/
http://w3af.sourceforge.net/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JkMount Syntax for complete directory mounting

2008-05-06 Thread Mladen Turk

Stephanie Wullbieter wrote:

if I want the whole apache directory tree /servlet/ and all the files and 
directories within to be routed to Tomcat worker1, what of the following is 
correct in mod_jk.conf?

JkMount /servlet worker1
JkMount /servlet/* worker1
(both together)



Both

You can even use short notion:
JkMount /servlet|/* worker1
that will basically produce two
mappings; /servlet and /servlet/*

Regards
--
^(TM)

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



Re: JkMount changing webapp context

2007-12-11 Thread Pid
Carlo Montanari wrote:
 I'm not sure whether this is the best mailing list for the question,
 feel free to blame me if it isn't.
 I have a simple configuration with apache 2.2.6, mod_jk 1.2.25 and
 tomcat 6.0.14.
 In tomcat I have a web application running, say /myapp, that I want to
 publish in apache as the root application of a dedicated virtualhost.
 In other words, when the users ask for http://www.myapphost.tld/, they
 should see the content of http://localhost:8009/myapp/
 Is it possible to achieve this result using only connector's
 configuration, or should I work on apache's side, maybe doing some trick
 with mod_rewrite?

No need. Just name the webapp ROOT, which is a special name, and
deploy it in the appropriate Tomcat virtual host.

There's plenty of info in the configuration docs.

http://tomcat.apache.org/



 Is it unusual the requirement of mapping each web application as the
 root of a virtualhost?

Not so much no.

p




 Thanks, bye
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: JkMount changing webapp context

2007-12-11 Thread Caldarale, Charles R
 From: Carlo Montanari [mailto:[EMAIL PROTECTED] 
 Subject: JkMount changing webapp context
 
 In other words, when the users ask for 
 http://www.myapphost.tld/, they should see the 
 content of http://localhost:8009/myapp/

For a Tomcat-only solution, define as many Host elements in server.xml
as you need, each with a different value for the appBase attribute.
Deploy each Host's default webapp as ROOT under the corresponding
appBase location.

Look at:
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

for more details.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: jkMount

2007-10-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

BuildSmart wrote:
 You're shitting me, it can't be that simple, thank you, it works as
 configured with my ajp13 worker.

Yes, it's that simple. Usually the only problem with mod_jk setup is
that people try to add too much complexity at once. I believe that
Tomcat is configured out-of-the-box to have the localhost virtual host
as the default, so this doesn't affect most people.

 It still doesn't work with the workerX though, I'm guessing that my
 workers.property file needs modification for workerX to work but since
 ajp13 works I just need to come up with a name that wont be common and
 hard code the properties into the module in an attempt to reduce
 configuration making it easier to implement.

You should not have to configure workerX. Your worker named ajp13
should be just fine. Forget I said anything about workerX.

 It works once I added the default virtualhost option

Good.

 I've now switched to my FRANKENSTIEN-module and the ajpx13 (modified
 ajp13) connector and I can execute the .jsp scripts from the apache
 virtualhost DOCUMENT_ROOT's as deep as the directories go

Excellent. So, how is your module different from mod_jk? I know you
removed some old stuff (ajp12?), but it seems like this ought to work by
simply passing httpd's DocumentRoot setting to Tomcat and then
overriding some of the JasperServlet methods to find the JSP relative to
httpd's DocumentRoot rather than relative to the webapp's deployment
directory.

Is this roughly what you're doing?

Would it be possible to instead simply configure the standard mod_jk
module to forward the PATH_TRANSLATED environment variable to Tomcat and
have it use that? I'm just looking for what might be a simpler solution:
if you only have to distribute a webapp, that's better than distributing
a webapp along with an Apache httpd module.

 When all is said and done, should this be passed to the tomcat
 developers or is it something that is so unique to my requirement that
 it's not worth bothering them with it?

If it's something that can be relatively easily added (and turned on
with configuration) and doesn't significantly change the existing code
(which, I guess, you could say is the same thing), then they may accept
a patch from you. Try not to be a jerk when submitting it, though. They
my already be ignoring you (notice they're no longer replying to you).

What, no thank you?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJy6p9CaO5/Lv0PARAmgLAJ9T8r2Y47eXKzU8eti0paU5z5gyEACeKzz6
JKbus5YYJAXdCb4UTAQ+klY=
=/Kbs
-END PGP SIGNATURE-

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



Re: jkMount

2007-10-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

BS,

BuildSmart wrote:
 jkMount /* myworker -- your example.
 
 It didn't work and only further proves that mod_jk lacks any real
 intelligence in functionality. 

You are not making any friends on this list. I need to fix your tone
right now before everyone lips your bozo bit and refuses to answer your
increasingly stupid posts.

Given that you are trying to hack-up a protocol to work in a way that ti
wasn't designed, I wouldn't start shooting my mouth off at the authors
of the code you're bastardizing.

 Well it sorta worked, it worked but only with localhost, none of my
 virtual hosts worked and I lost perl and php functionality so it really
 didn't work.

It totally did work. You mapped everything to Tomcat, so everything went
to Tomcat. Just because you wanted Apache to make the same decision you
would have .php goes to php runner, .jsp goes to Tomcat doesn't mean
that mod_jk is broken: it means that your understanding of how to
configure it is broken.

You obviously have not read the documentation clearly, or you wouldn't
be asking these questions.

As for only working on localhost, you need to check the rest of your
Apache httpd and Tomcat configurations: you probably don't have the
right virtual host config on either httpd or Tomcat or both. My guess is
both.

 No idea, why you claim that.
 
 Because it's true and I have seen no proof of the contrary, what I do
 get are well intentioned individuals offering advice however the advice
 must be incomplete because none of the offered suggestions work.

Dude, everyone uses JkMount /*.jsp workerX. It can't be just you. Or
can it? You've been monkeying around in the mod_jk code to create this
zombie mod_just_jsp thing and now you want to complain that it doesn't
work? Get bent. You probably broke it yourself.

 Concerning vhosts, I didn't understand, what you try to achieve.
 Please try the above JkMount first. As soon as that works for you, we
 can discuss further requirements.
 
 I did, it doesn't work and it kills python and php functionality.

No, you said that JkMount /* workerX kills Python and Php. Rainer is
asking you to use JkMount /*.jsp workerX.

 Note: Jkmount by default doesn't get inhertited between vhosts,
 because usually mounts are vhost specific. You need to put the JkMount
 into the vhost (or use JkMountCopy). See the docs.
 
 Putting anything into a specific vhost is a moronic concept if the
 webapp is to be shared by all virtualhosts.

You seriously need to check yourself. While the above may be true, your
frustration should not result in such poor manners.

 I have several hundred virtual hosts and to have to configure each
 one independently to access the webapp should not even be contemplated.

I think you're trying to do something that is just complex and a pain in
the ass. Php and Python are not application servers. Tomcat is an
application server and JSPs are designed to run in them. AJP is a
protocol that was designed to support this architecture. mod_jk is an
implementation of that protocol also designed to support that architecture.

Don't complain when mod_jk and AJP don't work on your Frankenstein
architecture.

 The advantages of serving the pages from the apache virtualhost
 DOCUMENT_ROOT's rather than from Tomcat's webapp docroot should have
 been a consideration and you can see why the concept has merrit
 but unfortunately it seems that they have limited vision and can't see
 past their own work.

Go talk to Sun.

 I'm left with no choice but to conclude that mod_jk was someone's failed
 attempt to achieve some kind of useful functionality that could be
 applied in a production virtualhost environment.
 
 Is there any other connector/module combination that has a different
 result than mod_jk?

Go use mod_jk2. It may be more your style. It's got a higher version
number, so it must be better, right?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJe3J9CaO5/Lv0PARAjQjAJ91hVxwIw5XtZ/6e+IRTMh0a5KzyACeLk0Q
7cjMq6oRkY3OJMB3mo1s4RY=
=lwj1
-END PGP SIGNATURE-

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



Re: jkMount

2007-10-29 Thread BuildSmart


On Oct 29, 2007, at 10:27:21, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

BS,

BuildSmart wrote:

jkMount /* myworker -- your example.

It didn't work and only further proves that mod_jk lacks any real
intelligence in functionality.


You are not making any friends on this list. I need to fix your tone
right now before everyone lips your bozo bit and refuses to answer  
your

increasingly stupid posts.

Given that you are trying to hack-up a protocol to work in a way  
that ti

wasn't designed, I wouldn't start shooting my mouth off at the authors
of the code you're bastardizing.


Well it sorta worked, it worked but only with localhost, none of my
virtual hosts worked and I lost perl and php functionality so it  
really

didn't work.


It totally did work. You mapped everything to Tomcat, so everything  
went
to Tomcat. Just because you wanted Apache to make the same decision  
you

would have .php goes to php runner, .jsp goes to Tomcat doesn't mean
that mod_jk is broken: it means that your understanding of how to
configure it is broken.


obviously not only my understanding is broken but the advise from  
well intentioned helpers who direct me to make configuration by only  
providing partial information expecting that I know what I'm doing  
where tomcat is concerned.




You obviously have not read the documentation clearly, or you wouldn't
be asking these questions.


clearly I have read the documentation but it does not provide a  
working configuration or even an example I can copy/paste that that  
does anything remotely close to what I'm being told to configure.




As for only working on localhost, you need to check the rest of your
Apache httpd and Tomcat configurations: you probably don't have the
right virtual host config on either httpd or Tomcat or both. My  
guess is

both.


I only have one webapp in Tomcat as localhost and it's on port 8080  
(with connector on 8009) what more do I need??


Don't tell me now that I have to add an entry in Tomcat for every  
virtualhost that wishes to access the webapp, that makes no logical  
sense to have multiple tomcat virtualhosts pointing to the same  
webapp/docroot.





No idea, why you claim that.


Because it's true and I have seen no proof of the contrary, what I do
get are well intentioned individuals offering advice however the  
advice

must be incomplete because none of the offered suggestions work.


Dude, everyone uses JkMount /*.jsp workerX. It can't be just you. Or
can it? You've been monkeying around in the mod_jk code to create this
zombie mod_just_jsp thing and now you want to complain that it doesn't
work? Get bent. You probably broke it yourself.


I'm using the mod_jk module and not a bastardized version so if it's  
not working per your configuration directives then it's the guys who  
coded mod_jk who are fault and you should bitch to them about it.





Concerning vhosts, I didn't understand, what you try to achieve.
Please try the above JkMount first. As soon as that works for  
you, we

can discuss further requirements.


I did, it doesn't work and it kills python and php functionality.


No, you said that JkMount /* workerX kills Python and Php. Rainer is
asking you to use JkMount /*.jsp workerX.


workerX is not defined anywhere but I'll give it a try to satisfy you.

[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
map_uri_to_worker::jk_uri_worker_map.c (597): Attempting to map URI '/ 
index.jsp' from 2 maps
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
map_uri_to_worker::jk_uri_worker_map.c (609): Attempting to map  
context URI '/servlet/*=workerX' source 'JkMount'
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
map_uri_to_worker::jk_uri_worker_map.c (609): Attempting to map  
context URI '/*.jsp=workerX' source 'JkMount'
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
map_uri_to_worker::jk_uri_worker_map.c (624): Found a wildchar match  
'/*.jsp=workerX'
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [debug]  
wc_get_worker_for_name::jk_worker.c (115): did not find a worker workerX
[Mon Oct 29 17:03:35 2007] [29592:2684415368] [error]  
jk_handler::mod_jk.c (2194): Could not init service for worker=workerX


guess that doesn't work either, any more suggestion???




Note: Jkmount by default doesn't get inhertited between vhosts,
because usually mounts are vhost specific. You need to put the  
JkMount

into the vhost (or use JkMountCopy). See the docs.


Putting anything into a specific vhost is a moronic concept if the
webapp is to be shared by all virtualhosts.


You seriously need to check yourself. While the above may be true,  
your

frustration should not result in such poor manners.


yes, you are correct, it should not, however, if it had only been a  
day or two of fiddling with it it wouldn't have been so bad but more  
than a week with incomplete directions hasn't help the frustration  
level, something is definitely broken if it wont work as 

Re: jkMount

2007-10-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

BuildSmart wrote:
 As for only working on localhost, you need to check the rest of your
 Apache httpd and Tomcat configurations: you probably don't have the
 right virtual host config on either httpd or Tomcat or both. My guess is
 both.
 
 I only have one webapp in Tomcat as localhost and it's on port 8080
 (with connector on 8009) what more do I need??

So, you have Tomcat configured to support the localhost virtual host
and you expect it to work with other virtual hosts? Apache httpd doesn't
do this, either. Why would you expect that an incorrect configuration
would work properly?

 Don't tell me now that I have to add an entry in Tomcat for every
 virtualhost that wishes to access the webapp, that makes no logical
 sense to have multiple tomcat virtualhosts pointing to the same
 webapp/docroot.

Aah, yes... but you're asking all virtual hosts in httpd to point to the
same Tomcat instance. Why does the symmetric relation not hold for such
an illogical statement?

Tomcat, like Apache httpd, can be configured to use a default virtual
host for all requests that do not match any of the explicitly-defined
virtual hosts. Since you are so familiar with the documentation, I won't
waste space in this post with the configuration.

 I'm using the mod_jk module and not a bastardized version so if it's not
 working per your configuration directives then it's the guys who coded
 mod_jk who are fault and you should bitch to them about it.

I've never had a problem with mod_jk. No complaints required from my
end. It's possible that mod_jk was written to support only virtual
hosts, and not JkMount options at the top-level. I'd be surprised at
this, but there's an easy workaround: use a global virtual host. In any
event, if you need this global capability (and it sounds like you do),
try asking for this capability instead of telling the mod_jk folks that
they are bunch of idiots. You catch more flies...

In your case, you have discrete virtual hosts. You may have to add
JkMount /*.jsp workerX for each virtual host. It's not insane: it's
what's required. You have to map DocumentRoot for each VirtualHost
element. What's wrong with adding this mapping as well.

 Concerning vhosts, I didn't understand, what you try to achieve.
 Please try the above JkMount first. As soon as that works for you, we
 can discuss further requirements.

 I did, it doesn't work and it kills python and php functionality.

 No, you said that JkMount /* workerX kills Python and Php. Rainer is
 asking you to use JkMount /*.jsp workerX.
 
 workerX is not defined anywhere but I'll give it a try to satisfy you.

OMGWTFBBQ. Nearly all of the mod_jk documentation surrounds creating
workers that connect mod_jk to Tomcat. You should have gotten /that/
far. You must have a worker, or nothing works. workerX is a
placeholder for the actual worker you want to use. Put your own worker's
name in there, don't just type workerX and complain when it doesn't work.

 guess that doesn't work either, any more suggestion???

Yes: use the name of the worker that you actually configured (ajp13, as
per the posted configuration).

 it wouldn't have been so bad but more than a
 week with incomplete directions hasn't help the frustration level,
 something is definitely broken if it wont work as people tell me to
 configure it and as you stated that is how everyone configures it and it
 works for them so either I'm not getting all of the information or it
 doesn't work.

Let's take a quick look at your configuration. workers.properties:

worker.list=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13

Note that you don't need the 'lbfactor' unless you are using a
load-balanced worker.

Now, to your httpd config:

IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /*.jsp ajp13
JkOptions +ForwardKeySize +ForwardURICompat
/IfModule

Your config is clearly being loaded, as you are getting messages in your
log file regarding mod_jk.

Where is this configuration located? Is it being put into a VirtualHost,
or is it at the top-level?

Can you post a mod_jk log of what /does/ happen when you use this
configuration and try to access a JSP page? My guess is that you'll see
there are no mappings in the URI worker map for that virtual host.

What happens if, for the sake of testing, you move the JkMount directive
into a specific virtual host and try that? Does it work, then?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJl+s9CaO5/Lv0PARAgEFAJ91gTgqtkKF2gFIbqDRHybp8Y5uOQCeOe+z
wPQ7varIZ+S2UaUMtQBiSmc=
=B5oJ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL 

Re: jkMount

2007-10-29 Thread BuildSmart


On Oct 29, 2007, at 18:33:16, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

BuildSmart wrote:

As for only working on localhost, you need to check the rest of your
Apache httpd and Tomcat configurations: you probably don't have the
right virtual host config on either httpd or Tomcat or both. My  
guess is

both.


I only have one webapp in Tomcat as localhost and it's on port 8080
(with connector on 8009) what more do I need??


So, you have Tomcat configured to support the localhost virtual host
and you expect it to work with other virtual hosts? Apache httpd  
doesn't

do this, either. Why would you expect that an incorrect configuration
would work properly?


Don't tell me now that I have to add an entry in Tomcat for every
virtualhost that wishes to access the webapp, that makes no logical
sense to have multiple tomcat virtualhosts pointing to the same
webapp/docroot.


Aah, yes... but you're asking all virtual hosts in httpd to point  
to the
same Tomcat instance. Why does the symmetric relation not hold for  
such

an illogical statement?

Tomcat, like Apache httpd, can be configured to use a default virtual
host for all requests that do not match any of the explicitly-defined
virtual hosts. Since you are so familiar with the documentation, I  
won't

waste space in this post with the configuration.


You're shitting me, it can't be that simple, thank you, it works as  
configured with my ajp13 worker.


It still doesn't work with the workerX though, I'm guessing that my  
workers.property file needs modification for workerX to work but  
since ajp13 works I just need to come up with a name that wont be  
common and hard code the properties into the module in an attempt to  
reduce configuration making it easier to implement.




I'm using the mod_jk module and not a bastardized version so if  
it's not
working per your configuration directives then it's the guys who  
coded

mod_jk who are fault and you should bitch to them about it.


I've never had a problem with mod_jk. No complaints required from my
end. It's possible that mod_jk was written to support only virtual
hosts, and not JkMount options at the top-level. I'd be surprised at
this, but there's an easy workaround: use a global virtual host. In  
any

event, if you need this global capability (and it sounds like you do),
try asking for this capability instead of telling the mod_jk folks  
that

they are bunch of idiots. You catch more flies...

In your case, you have discrete virtual hosts. You may have to add
JkMount /*.jsp workerX for each virtual host. It's not insane: it's
what's required. You have to map DocumentRoot for each VirtualHost
element. What's wrong with adding this mapping as well.


Concerning vhosts, I didn't understand, what you try to achieve.
Please try the above JkMount first. As soon as that works for  
you, we

can discuss further requirements.


I did, it doesn't work and it kills python and php functionality.


No, you said that JkMount /* workerX kills Python and Php.  
Rainer is

asking you to use JkMount /*.jsp workerX.


workerX is not defined anywhere but I'll give it a try to satisfy  
you.


OMGWTFBBQ. Nearly all of the mod_jk documentation surrounds creating
workers that connect mod_jk to Tomcat. You should have gotten /that/
far. You must have a worker, or nothing works. workerX is a
placeholder for the actual worker you want to use. Put your own  
worker's
name in there, don't just type workerX and complain when it  
doesn't work.


I had that in my config, that's what I was told to put in it, I  
already had JkMount /*.jsp ajp13 when they said to try JkMount / 
*.jsp workerX so I did.





guess that doesn't work either, any more suggestion???


Yes: use the name of the worker that you actually configured  
(ajp13, as

per the posted configuration).


it wouldn't have been so bad but more than a
week with incomplete directions hasn't help the frustration level,
something is definitely broken if it wont work as people tell me to
configure it and as you stated that is how everyone configures it  
and it

works for them so either I'm not getting all of the information or it
doesn't work.


Let's take a quick look at your configuration. workers.properties:

worker.list=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13

Note that you don't need the 'lbfactor' unless you are using a
load-balanced worker.


yeah I removed that a while ago along with the ps=/  variable.



Now, to your httpd config:

IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /*.jsp ajp13
JkOptions +ForwardKeySize +ForwardURICompat
/IfModule

Your config is clearly being loaded, as you are getting messages in  
your

log file regarding mod_jk.

Where is this configuration located? Is it being put into a  
VirtualHost,

or is it at the top-level?


top 

Re: jkMount

2007-10-29 Thread Ingo Krabbe
Am Montag, 29. Oktober 2007 23:33:16 schrieb Christopher Schultz:
 Dale,

 BuildSmart wrote:
  As for only working on localhost, you need to check the rest of your
  Apache httpd and Tomcat configurations: you probably don't have the
  right virtual host config on either httpd or Tomcat or both. My guess is
  both.
 
  I only have one webapp in Tomcat as localhost and it's on port 8080
  (with connector on 8009) what more do I need??

 So, you have Tomcat configured to support the localhost virtual host
 and you expect it to work with other virtual hosts? Apache httpd doesn't
 do this, either. Why would you expect that an incorrect configuration
 would work properly?

  Don't tell me now that I have to add an entry in Tomcat for every
  virtualhost that wishes to access the webapp, that makes no logical
  sense to have multiple tomcat virtualhosts pointing to the same
  webapp/docroot.

 Aah, yes... but you're asking all virtual hosts in httpd to point to the
 same Tomcat instance. Why does the symmetric relation not hold for such
 an illogical statement?

 Tomcat, like Apache httpd, can be configured to use a default virtual
 host for all requests that do not match any of the explicitly-defined
 virtual hosts. Since you are so familiar with the documentation, I won't
 waste space in this post with the configuration.

  I'm using the mod_jk module and not a bastardized version so if it's not
  working per your configuration directives then it's the guys who coded
  mod_jk who are fault and you should bitch to them about it.

 I've never had a problem with mod_jk. No complaints required from my
 end. It's possible that mod_jk was written to support only virtual
 hosts, and not JkMount options at the top-level. I'd be surprised at
 this, but there's an easy workaround: use a global virtual host. In any
 event, if you need this global capability (and it sounds like you do),
 try asking for this capability instead of telling the mod_jk folks that
 they are bunch of idiots. You catch more flies...

Actually I had BIG problems with JkMount at a time ... well I think there was 
a major flaw in communication between the module and the tomcat vm ... or 
somewhere else.  Anyway these problems are thought to be gone in recent 
versions (I think).


 In your case, you have discrete virtual hosts. You may have to add
 JkMount /*.jsp workerX for each virtual host. It's not insane: it's
 what's required. You have to map DocumentRoot for each VirtualHost
 element. What's wrong with adding this mapping as well.


The virtual host problem can be solved quite easily be apache configuration if 
you define you JkMount statements in a simple include file lets call it 
jkmount.conf and use them in your virtual host statements:

VirtualHost bla:80
#   [...]
include jkmount.conf
#   [...]
/VirtualHost


  Concerning vhosts, I didn't understand, what you try to achieve.
  Please try the above JkMount first. As soon as that works for you, we
  can discuss further requirements.
 
  I did, it doesn't work and it kills python and php functionality.
 
  No, you said that JkMount /* workerX kills Python and Php. Rainer is
  asking you to use JkMount /*.jsp workerX.
 
  workerX is not defined anywhere but I'll give it a try to satisfy you.

 OMGWTFBBQ. Nearly all of the mod_jk documentation surrounds creating
 workers that connect mod_jk to Tomcat. You should have gotten /that/
 far. You must have a worker, or nothing works. workerX is a
 placeholder for the actual worker you want to use. Put your own worker's
 name in there, don't just type workerX and complain when it doesn't work.


ouch, yes of course there should be workers.

  guess that doesn't work either, any more suggestion???

 Yes: use the name of the worker that you actually configured (ajp13, as
 per the posted configuration).

  it wouldn't have been so bad but more than a
  week with incomplete directions hasn't help the frustration level,
  something is definitely broken if it wont work as people tell me to
  configure it and as you stated that is how everyone configures it and it
  works for them so either I'm not getting all of the information or it
  doesn't work.

No, it just a bit insane.  Nore more then anything else that is done with 
Java.


 Let's take a quick look at your configuration. workers.properties:

 worker.list=ajp13
 worker.ajp13.host=localhost
 worker.ajp13.port=8019
 worker.ajp13.type=ajp13

 Note that you don't need the 'lbfactor' unless you are using a
 load-balanced worker.

 Now, to your httpd config:

 IfModule mod_jk.c
 JKWorkersFile /etc/httpd/workers.ajp13.properties
 JKLogFile /var/log/httpd/mod_jk.log
 JKLogLevel debug
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 JkMount /*.jsp ajp13
 JkOptions +ForwardKeySize +ForwardURICompat
 /IfModule

 Your config is clearly being loaded, as you are getting messages in your
 log file regarding mod_jk.

 Where is this configuration located? Is it being put into a VirtualHost,
 or is it at the 

Re: jkMount

2007-10-28 Thread Rainer Jung

Hi,

BuildSmart wrote:

I'm trying to get around a configuration issue.

My webapp builds dynamic script content but the generated scripts are 
not accessible.


For example, calling 
http://domain.tld/index.jsp?ip=192.168.0.10count=10key=robot; should 
generate some subdirectories and builds some jsp pages with content and 
this seems to work as expected but from apache these are not accessible 
but from the Tomcat port I can access the pages without issue, is there 
a way to resolve this?


With respect to what is following below, I'm not actually sure, if I 
understand, what you mean by not accessible.


I can't pre-define the mount points for the subdirectories because I 
don't know what they are in advance, there doesn't seem to be a way to 
define access to Tomcat based on the file extension since it wont let 
you assign a mount point without a leading /.


JkMount /*.jsp myworker

would be perfectly valid. You can combine prefixes and suffixes.
If there are no rules at all (no known prefixes and no known suffixes) 
then your URL space is weird and you can only use


JkMount /* myworker

and live with the consequences :(

In case it would be easier to describe, what *not* to forward, you can 
combine JkMount with JkUnmount


See

http://tomcat.apache.org/connectors-doc/reference/apache.html
and
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

See further comments inline.

Maybe I should be using a different protocol that allows assignment by 
file extension (if one exists) but google has done nothing but create 
more confusion for me.


___

My apache config contains:
___

IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 


That was our old default JkLogStampFormat. If you omit the lines, you 
will get milliseconds for free starting with mod_jk 1.2.25.



JkMount /*.jsp ajp13


Uups: there you are, you already use a suffix pattern!


JkOptions +ForwardKeySize +ForwardURICompat


It's very likely, that you won't need the +ForwardURICompat when using 
an up-to-date mod_jk.



/IfModule
___

my workers.ajp13.properties contains:
___

ps=/


This defines a variable ps, which you are never using. Simply delete this.


# Define 1 real worker using ajp13
worker.list=ajp13

# 
# First worker server
# 
# Set properties for ajp13 (ajp13)
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1

#
# END workers.properties
#
___


-- Dale


Regards,

Rainer

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



Re: jkMount

2007-10-28 Thread BuildSmart


On Oct 28, 2007, at 08:32:50, Rainer Jung wrote:


Hi,

BuildSmart wrote:

I'm trying to get around a configuration issue.
My webapp builds dynamic script content but the generated scripts  
are not accessible.
For example, calling http://domain.tld/index.jsp? 
ip=192.168.0.10count=10key=robot should generate some  
subdirectories and builds some jsp pages with content and this  
seems to work as expected but from apache these are not accessible  
but from the Tomcat port I can access the pages without issue, is  
there a way to resolve this?


With respect to what is following below, I'm not actually sure, if  
I understand, what you mean by not accessible.


not accessible means apache cannot access the pages, gives an error  
-- page does not exist.


if the content pages that are built have the following paths:
docroot/index.jsp -- the main page
docroot/example/user.jsp -- generated by main page
docroot/example/data.jsp -- generated by main page

I cannot access any pages in examples directory from apache.

I cannot code the subdirectory because they are generated on the fly  
and I do not know in advance that they are.


I cannot use /* because apache also has other content handlers like  
php and then Tomcat errors on the php file.




I can't pre-define the mount points for the subdirectories because  
I don't know what they are in advance, there doesn't seem to be a  
way to define access to Tomcat based on the file extension since  
it wont let you assign a mount point without a leading /.


JkMount /*.jsp myworker

would be perfectly valid. You can combine prefixes and suffixes.
If there are no rules at all (no known prefixes and no known  
suffixes) then your URL space is weird and you can only use


JkMount /* myworker

and live with the consequences :(

In case it would be easier to describe, what *not* to forward, you  
can combine JkMount with JkUnmount


Now I'd be getting into a complicated and bastardized configuration.



See

http://tomcat.apache.org/connectors-doc/reference/apache.html
and
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

See further comments inline.

Maybe I should be using a different protocol that allows  
assignment by file extension (if one exists) but google has done  
nothing but create more confusion for me.

___
My apache config contains:
___
IfModule mod_jk.c
JKWorkersFile /etc/httpd/workers.ajp13.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 


That was our old default JkLogStampFormat. If you omit the lines,  
you will get milliseconds for free starting with mod_jk 1.2.25.



JkMount /*.jsp ajp13


Uups: there you are, you already use a suffix pattern!


JkOptions +ForwardKeySize +ForwardURICompat


It's very likely, that you won't need the +ForwardURICompat when  
using an up-to-date mod_jk.



/IfModule
___
my workers.ajp13.properties contains:
___
ps=/


This defines a variable ps, which you are never using. Simply  
delete this.



# Define 1 real worker using ajp13
worker.list=ajp13
# 
# First worker server
# 
# Set properties for ajp13 (ajp13)
worker.ajp13.host=localhost
worker.ajp13.port=8019
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
#
# END workers.properties
#
___
-- Dale


Regards,

Rainer


Forgive me for complaining but why on earth has no servlet handler/ 
module been developed that processes by file extension rather than  
only by context.


It would be nice to do:
jkMount *.jsp ajp13

then all .jsp files would be processed by the handler, of course  
mod_jk doesn't allow it and to do it by file extension would be too  
intelligent and renders a lot of current configuration complicated  
methods obsolete.


adding mode_rewrite or having to configure more than a single webapp  
host makes no sense if all you want to do is gain access to the java  
engine to deploy pgaes from within apache and having to define more  
than one host/port in Tomcat is a retarded concept by any standards.


I believe that one host/port can be used by any apache virtualhost to  
server pages from the apache virtualhost DOCUMENT_ROOT and not the  
webapp docroot making it's implementation far more dynamic and  
useable rather than all the complicated configuring of the current  
methods discussed on this list.


A good example of this in action is BlueDragon, it has a custom  
connector and a module to handle the communication between the webapp  
server and apache.


Adobe CF does something similiar with mod_jrun but it's configuration  
is a little more complicated and also not a free useable solution.


BlueDragon makes integration and use from apache very easy to  
achieve, does not require telling the webapp server where the apache 

Re: jkMount

2007-10-28 Thread Rainer Jung

Comments inline

BuildSmart wrote:


On Oct 28, 2007, at 08:32:50, Rainer Jung wrote:


Hi,

BuildSmart wrote:

I'm trying to get around a configuration issue.
My webapp builds dynamic script content but the generated scripts are 
not accessible.
For example, calling 
http://domain.tld/index.jsp?ip=192.168.0.10count=10key=robot 
http://domain.tld/index.jsp?ip=192.168.0.10count=10key=robot 
should generate some subdirectories and builds some jsp pages with 
content and this seems to work as expected but from apache these are 
not accessible but from the Tomcat port I can access the pages 
without issue, is there a way to resolve this?


With respect to what is following below, I'm not actually sure, if I 
understand, what you mean by not accessible.


not accessible means apache cannot access the pages, gives an error 
-- page does not exist.


if the content pages that are built have the following paths:
docroot/index.jsp -- the main page
docroot/example/user.jsp -- generated by main page
docroot/example/data.jsp -- generated by main page

I cannot access any pages in examples directory from apache.

I cannot code the subdirectory because they are generated on the fly and 
I do not know in advance that they are.


I cannot use /* because apache also has other content handlers like php 
and then Tomcat errors on the php file.




I can't pre-define the mount points for the subdirectories because I 
don't know what they are in advance, there doesn't seem to be a way 
to define access to Tomcat based on the file extension since it wont 
let you assign a mount point without a leading /.


JkMount /*.jsp myworker

would be perfectly valid. You can combine prefixes and suffixes.
If there are no rules at all (no known prefixes and no known suffixes) 
then your URL space is weird and you can only use


JkMount /* myworker

and live with the consequences :(

In case it would be easier to describe, what *not* to forward, you can 
combine JkMount with JkUnmount


Now I'd be getting into a complicated and bastardized configuration.



See

http://tomcat.apache.org/connectors-doc/reference/apache.html
and
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

Forgive me for complaining but why on earth has no servlet 
handler/module been developed that processes by file extension rather 
than only by context.


It would be nice to do:
jkMount *.jsp ajp13


That's exaclty what happens, if you use

JkMount /*.jsp ajp13

then all .jsp files would be processed by the handler, of course mod_jk 
doesn't allow it and to do it by file extension would be too intelligent 
and renders a lot of current configuration complicated methods obsolete.


*It does allow it*
I already included this example in my previous mail. You didn't comment 
that example.


adding mode_rewrite or having to configure more than a single webapp 
host makes no sense if all you want to do is gain access to the java 
engine to deploy pgaes from within apache and having to define more than 
one host/port in Tomcat is a retarded concept by any standards.


Currently due to the lack of functionality based on the current ajp 
connector and mod_jk, my current solution to execute the .jsp files from 
the apache DOCUMENT_ROOT's is limited to the .jsp files being at the 
first level of the DOCUMENT_ROOT because mod_jk is too stupid to allow 
mapping by file extension and this is not acceptable.


No idea, why you claim that.

If it involves more than a simple configuration of the apache module 
then the method is tainted.


I want to server the .jsp pages from any apache DOCUMENT_ROOT without 
requiring a degree to configure several modules to achieve the goal.


I'd pay someone to write the connector and module for me cause my java 
skills suck but I'm currently so dumb-founded that no one else has 
achieved or even complained that the current method of implementation is 
useless in a production environment where apache virtualhosts are the norm.


I have a partial solution based on the modified Ajp13Connector class and 
a modified mod_jk module but as I stated earlier, it's limited to the 
first level of DOCUMENT_ROOT because mapping by file extension is not 
possible.


The above example is *not* restricted to one level of directory. A '*' 
in a JkMount URI matches any sequence of charaters, including a '/'.


Concerning vhosts, I didn't understand, what you try to achieve. Please 
try the above JkMount first. As soon as that works for you, we can 
discuss further requirements.


Note: Jkmount by default doesn't get inhertited between vhosts, because 
usually mounts are vhost specific. You need to put the JkMount into the 
vhost (or use JkMountCopy). See the docs.


Regards,

Rainer

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



Re: jkMount

2007-10-28 Thread BuildSmart


On Oct 28, 2007, at 10:47:19, Rainer Jung wrote:


Comments inline

BuildSmart wrote:

On Oct 28, 2007, at 08:32:50, Rainer Jung wrote:

Hi,

BuildSmart wrote:

I'm trying to get around a configuration issue.
My webapp builds dynamic script content but the generated  
scripts are not accessible.
For example, calling http://domain.tld/index.jsp? 
ip=192.168.0.10count=10key=robot http://domain.tld/index.jsp? 
ip=192.168.0.10count=10key=robot should generate some  
subdirectories and builds some jsp pages with content and this  
seems to work as expected but from apache these are not  
accessible but from the Tomcat port I can access the pages  
without issue, is there a way to resolve this?


With respect to what is following below, I'm not actually sure,  
if I understand, what you mean by not accessible.
not accessible means apache cannot access the pages, gives an  
error -- page does not exist.

if the content pages that are built have the following paths:
docroot/index.jsp -- the main page
docroot/example/user.jsp -- generated by main page
docroot/example/data.jsp -- generated by main page
I cannot access any pages in examples directory from apache.
I cannot code the subdirectory because they are generated on the  
fly and I do not know in advance that they are.
I cannot use /* because apache also has other content handlers  
like php and then Tomcat errors on the php file.


I can't pre-define the mount points for the subdirectories  
because I don't know what they are in advance, there doesn't  
seem to be a way to define access to Tomcat based on the file  
extension since it wont let you assign a mount point without a  
leading /.


JkMount /*.jsp myworker

would be perfectly valid. You can combine prefixes and suffixes.
If there are no rules at all (no known prefixes and no known  
suffixes) then your URL space is weird and you can only use


JkMount /* myworker

and live with the consequences :(

In case it would be easier to describe, what *not* to forward,  
you can combine JkMount with JkUnmount

Now I'd be getting into a complicated and bastardized configuration.


See

http://tomcat.apache.org/connectors-doc/reference/apache.html
and
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

Forgive me for complaining but why on earth has no servlet handler/ 
module been developed that processes by file extension rather than  
only by context.

It would be nice to do:
jkMount *.jsp ajp13


That's exaclty what happens, if you use

JkMount /*.jsp ajp13

then all .jsp files would be processed by the handler, of course  
mod_jk doesn't allow it and to do it by file extension would be  
too intelligent and renders a lot of current configuration  
complicated methods obsolete.


*It does allow it*
I already included this example in my previous mail. You didn't  
comment that example.


jkMount /* myworker -- your example.

It didn't work and only further proves that mod_jk lacks any real  
intelligence in functionality.


Well it sorta worked, it worked but only with localhost, none of my  
virtual hosts worked and I lost perl and php functionality so it  
really didn't work.




adding mode_rewrite or having to configure more than a single  
webapp host makes no sense if all you want to do is gain access to  
the java engine to deploy pgaes from within apache and having to  
define more than one host/port in Tomcat is a retarded concept by  
any standards.


Currently due to the lack of functionality based on the current  
ajp connector and mod_jk, my current solution to execute the .jsp  
files from the apache DOCUMENT_ROOT's is limited to the .jsp files  
being at the first level of the DOCUMENT_ROOT because mod_jk is  
too stupid to allow mapping by file extension and this is not  
acceptable.


No idea, why you claim that.


Because it's true and I have seen no proof of the contrary, what I do  
get are well intentioned individuals offering advice however the  
advice must be incomplete because none of the offered suggestions work.




If it involves more than a simple configuration of the apache  
module then the method is tainted.
I want to server the .jsp pages from any apache DOCUMENT_ROOT  
without requiring a degree to configure several modules to achieve  
the goal.
I'd pay someone to write the connector and module for me cause my  
java skills suck but I'm currently so dumb-founded that no one  
else has achieved or even complained that the current method of  
implementation is useless in a production environment where apache  
virtualhosts are the norm.
I have a partial solution based on the modified Ajp13Connector  
class and a modified mod_jk module but as I stated earlier, it's  
limited to the first level of DOCUMENT_ROOT because mapping by  
file extension is not possible.


The above example is *not* restricted to one level of directory. A  
'*' in a JkMount URI matches any sequence of charaters, including a  
'/'.


using anything but localhost in the url does not 

Re: JkMount and Context path

2006-08-21 Thread Evan J

Martin,

Indeed, I had the same setting with the standalone Tomcat webserver
and the configuration your mention would work properly as it expected.
As I had mentioned in earlier posts to this thread, I do not have a
reason to utilize a third party webserver. At this point I am just
trying various configuration as a means of learning in case in the
future I end up be needing to deploy Tomcat in such environment.

Sincerely,

Evan

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



Re: JkMount and Context path

2006-08-21 Thread Martin Gainty
Apache is and always will be a CGI processor..for that reason I like Tomcat to 
run standalone 
(If someone changes the httpd.conf  or worker.properties files your config is 
hosed..)

*In either case I'm glad that helped you*

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: Evan J  [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, August 21, 2006 9:28 AM
Subject: Re: JkMount and Context path


 Martin,
 
 Indeed, I had the same setting with the standalone Tomcat webserver
 and the configuration your mention would work properly as it expected.
 As I had mentioned in earlier posts to this thread, I do not have a
 reason to utilize a third party webserver. At this point I am just
 trying various configuration as a means of learning in case in the
 future I end up be needing to deploy Tomcat in such environment.
 
 Sincerely,
 
 Evan
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: JkMount and Context path

2006-08-20 Thread Evan J

Martin,

I have the documents and I'm aware the difinition of Context path and
from what you have posted, it says, It is matched against the
requesting URI. Now, my question was having Context path set, what
would the appropriate URI in case that the system utilizes Apache and
jk_mod in which JkMount is used for the requests to be processes by
jk_mod and passed on to Tomcat? Allow me to restate my example, so you
will be able to answer my question through the example itself.

JkMount /*/esrvlt/* worker1
JkMount /*/esrvlt/*.jsp worker1

The web application is myapp
Context path is /someuri
One of the servlet mapping in web.xml is /esrvlt/myservlet

Now given that, how should myservlet be accessed, that is the actual
URL must look like?

http://vh.host.com/myapp/esrvlt/myservlet OR
http://vh.host.com/someuri/myapp/esrvlt/myservlet OR
Must it have a different set of configuration (jkMount, path, mapping)
in order to be accessed properly? Or Context path in such situation
has no bearing? Please answer through forementioned scenario.

And as for using Apache webserver... I am just playing around with
different configuration in order to understand how they interact with
each other. For now, I have no need to utilize a third party web
server. Although, that being said, I can see usage for having a front
end web server to, for example, pass on the load balancing to it
rather than let Tomcat's handle it. And as you have posted, directives
such as JkAutoAlias/JkMount/JkUnMount would allow me to process those
files that can be statistically served such as .gif or .html and
dynamic content to be passed on and handled by Tomcat (or any other
web container).

Sincerely,

Evan


On 8/20/06, Martin Gainty [EMAIL PROTECTED] wrote:

Context path=/urlPath docBase=/com/packagename ... 
#path is the context path of the webapp which is matched against the requesting 
URI to choose appropriate webapp to process (all paths must be unique)
#docBase maps the urlPath to physical docBase (which can either be absolute 
path or relative to webapps)
#embedding context elements within server.xml has been replaced by 
encapsulating context.xml for each webapp 
#$CATALINA_HOME/webapps/WebApp/META-INF/context.xml

#within context You also have the capability of passing in initialisation 
parameters via Parameter in context.xml
#or Environment settings via Environment parameter

#If you have JDBC resources You can also declare ResourceParams for jdbc 
connections via ResourceParams

#You can also declare global JNDI resource via ResourceLink

Doc available at
http://tomcat.apache.org/tomcat-5.0-doc/config/context.html

Mod-jk
#mod_jk JkAutoAlias maps all web application context directories into Apache 
document space..you DONT want to do this if you want to give Tomcat
#control of the folder as in the example illustrated here
JkAutoAlias /export/home/web/host2/webapps

JkMount /*.jsp ajp13
JkMount /*/servlet/ ajp13

#A single webapp mapped into Apache document space can be accomplished via 
Alias as in this example
 Alias /examples /export/home/web/host1/webapps/examples
 JkMount /*.jsp ajp13
 JkMount /*/servlet/ ajp13

All of this depends on how you are configuring your Context listener as in this 
example
Host name=localhost debug=0 appbase=webapps 
  Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
  append=true  forwardAll=true/ 
/
#where the most significant parameter forwardAll = true will direct apache to 
forward your context listener requests to tomcat
#verify these settings by viewing mod-jk.conf

The only question I have is why not let tomcat run standalone?
M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message -
From: Evan J  [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org; Martin Gainty [EMAIL 
PROTECTED]
Sent: Sunday, August 20, 2006 1:01 AM
Subject: Re: JkMount and Context path


 Ok, your answer just recaps everything that is needed to run
 Apache-jk_mod-Tomcat but does not answer my question. What if in your
 setting, you have set Context path, what would be the consequences?
 How are the servlets then are accessed? Is it required to include
 Context path in the uri ending to the servlet like the examples are
 provided earlier? It seems like that is not the case so I am taking it
 either Context path, if it's designated, has no bearing when it comes
 to jk_mod or must be included in the uri in some other way.

 On 8/19/06, Martin Gainty [EMAIL PROTECTED] wrote:
 /*httpd.conf
 JkMount maps all JSP (*.jsp) to ajp13
 */
 e.g.
 httpd.conf
 JkMount /*.jsp ajp13

 /*map ajp13 to your webapp docRoot /var

Re: JkMount and Context path

2006-08-20 Thread Martin Gainty
Why are you mixing up Apache and Tomcat?

If you are speaking of AJP 'context' term 
 if you look at the doc you will see
JkMount [URL prefix] [Worker name]
/*where URL prefix is the context*/
JkMount /*/esrvlt/* worker1
Send all requests of whateverWebApp/eservlet/WhateverFileName to worker1 so in 
essence
http://host/*/eservlet/anything
will be directed to Tomcat

Assuming your workers.properties has this configuration
#workers.properties
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13

/*Now all tomcat requests are redirected to localhost on port 8009*/
/*Inside $TOMCAT_HOME/conf/server.xml you have a connector which will listen on 
port 8009*/
   !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8009 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=0
   useURIValidationHack=false
   protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: Evan J  [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org; Martin Gainty [EMAIL 
PROTECTED]
Sent: Sunday, August 20, 2006 1:15 PM
Subject: Re: JkMount and Context path


 Martin,
 
 I have the documents and I'm aware the difinition of Context path and
 from what you have posted, it says, It is matched against the
 requesting URI. Now, my question was having Context path set, what
 would the appropriate URI in case that the system utilizes Apache and
 jk_mod in which JkMount is used for the requests to be processes by
 jk_mod and passed on to Tomcat? Allow me to restate my example, so you
 will be able to answer my question through the example itself.
 
 JkMount /*/esrvlt/* worker1
 JkMount /*/esrvlt/*.jsp worker1
 
 The web application is myapp
 Context path is /someuri
 One of the servlet mapping in web.xml is /esrvlt/myservlet
 
 Now given that, how should myservlet be accessed, that is the actual
 URL must look like?
 
 http://vh.host.com/myapp/esrvlt/myservlet OR
 http://vh.host.com/someuri/myapp/esrvlt/myservlet OR
 Must it have a different set of configuration (jkMount, path, mapping)
 in order to be accessed properly? Or Context path in such situation
 has no bearing? Please answer through forementioned scenario.
 
 And as for using Apache webserver... I am just playing around with
 different configuration in order to understand how they interact with
 each other. For now, I have no need to utilize a third party web
 server. Although, that being said, I can see usage for having a front
 end web server to, for example, pass on the load balancing to it
 rather than let Tomcat's handle it. And as you have posted, directives
 such as JkAutoAlias/JkMount/JkUnMount would allow me to process those
 files that can be statistically served such as .gif or .html and
 dynamic content to be passed on and handled by Tomcat (or any other
 web container).
 
 Sincerely,
 
 Evan
 
 
 On 8/20/06, Martin Gainty [EMAIL PROTECTED] wrote:
 Context path=/urlPath docBase=/com/packagename ... 
 #path is the context path of the webapp which is matched against the 
 requesting URI to choose appropriate webapp to process (all paths must be 
 unique)
 #docBase maps the urlPath to physical docBase (which can either be absolute 
 path or relative to webapps)
 #embedding context elements within server.xml has been replaced by 
 encapsulating context.xml for each webapp 
 #$CATALINA_HOME/webapps/WebApp/META-INF/context.xml

 #within context You also have the capability of passing in initialisation 
 parameters via Parameter in context.xml
 #or Environment settings via Environment parameter

 #If you have JDBC resources You can also declare ResourceParams for jdbc 
 connections via ResourceParams

 #You can also declare global JNDI resource via ResourceLink

 Doc available at
 http://tomcat.apache.org/tomcat-5.0-doc/config/context.html

 Mod-jk
 #mod_jk JkAutoAlias maps all web application context directories into Apache 
 document space..you DONT want to do this if you want to give Tomcat
 #control of the folder as in the example illustrated here
 JkAutoAlias /export/home/web/host2/webapps

 JkMount /*.jsp ajp13
 JkMount /*/servlet/ ajp13

 #A single webapp mapped into Apache document space can be accomplished via 
 Alias as in this example
  Alias /examples /export/home/web/host1/webapps/examples
  JkMount /*.jsp ajp13
  JkMount /*/servlet/ ajp13

 All of this depends on how you

Re: JkMount and Context path

2006-08-20 Thread Evan J

Yes, I understand that perfectly. What I am asking is what if we
include a web application Context path, that is Context
path=someuri Of course, JkMount /*/eservlet/* would relay all
the request with mywebapp/eservlet/* from Apache to Tomcat -- I am
aware of that. Now if we set Context path=someuri..., what is
going to happen to our URI?

Here's an excerpt from Tomcat config document:

The context path of this web application, which is matched against
the beginning of each request URI to select the appropriate web
application for processing. All of the context paths within a
particular Host must be unique. If you specify a context path of an
empty string (), you are defining the default web application for
this Host, which will process all requests not assigned to other
Contexts. The value of this field must not be set except when
statically defining a Context in server.xml, as it will be infered
from the filenames used for either the .xml context file or the
docBase.

So when Apache webserver gets a request for a particular virtualhost,
jk_mod sees if the request must be handled by Tomcat (i.e. satisfies
/*/eservlet/*) or not. If it does, it relays it to the appropriate
host and depending on path which is defined above, finally the
request is handed to the appropriate context or web application
designated for that Host (based on that path, again according to
the excerpt above).  Now, having specified the path, how are we
going to access a servlet with such scenario? I gave a straightforward
example but you still didn't answer my question.

On 8/20/06, Martin Gainty [EMAIL PROTECTED] wrote:

Why are you mixing up Apache and Tomcat?

If you are speaking of AJP 'context' term
 if you look at the doc you will see
JkMount [URL prefix] [Worker name]
/*where URL prefix is the context*/
JkMount /*/esrvlt/* worker1
Send all requests of whateverWebApp/eservlet/WhateverFileName to worker1 so in 
essence
http://host/*/eservlet/anything
will be directed to Tomcat

Assuming your workers.properties has this configuration
#workers.properties
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13

/*Now all tomcat requests are redirected to localhost on port 8009*/
/*Inside $TOMCAT_HOME/conf/server.xml you have a connector which will listen on 
port 8009*/
   !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
  Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8009 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=0
   useURIValidationHack=false
   protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message -
From: Evan J  [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org; Martin Gainty [EMAIL 
PROTECTED]
Sent: Sunday, August 20, 2006 1:15 PM
Subject: Re: JkMount and Context path


 Martin,

 I have the documents and I'm aware the difinition of Context path and
 from what you have posted, it says, It is matched against the
 requesting URI. Now, my question was having Context path set, what
 would the appropriate URI in case that the system utilizes Apache and
 jk_mod in which JkMount is used for the requests to be processes by
 jk_mod and passed on to Tomcat? Allow me to restate my example, so you
 will be able to answer my question through the example itself.

 JkMount /*/esrvlt/* worker1
 JkMount /*/esrvlt/*.jsp worker1

 The web application is myapp
 Context path is /someuri
 One of the servlet mapping in web.xml is /esrvlt/myservlet

 Now given that, how should myservlet be accessed, that is the actual
 URL must look like?

 http://vh.host.com/myapp/esrvlt/myservlet OR
 http://vh.host.com/someuri/myapp/esrvlt/myservlet OR
 Must it have a different set of configuration (jkMount, path, mapping)
 in order to be accessed properly? Or Context path in such situation
 has no bearing? Please answer through forementioned scenario.

 And as for using Apache webserver... I am just playing around with
 different configuration in order to understand how they interact with
 each other. For now, I have no need to utilize a third party web
 server. Although, that being said, I can see usage for having a front
 end web server to, for example, pass on the load balancing to it
 rather than let Tomcat's handle it. And as you have posted, directives
 such as JkAutoAlias/JkMount/JkUnMount would allow me to process those
 files that can be statistically served such as .gif or .html and
 dynamic

Re: JkMount and Context path

2006-08-20 Thread Mark Thomas
Evan J wrote:
 Yes, I understand that perfectly. What I am asking is what if we
 include a web application Context path, that is Context
 path=someuri Of course, JkMount /*/eservlet/* would relay all
 the request with mywebapp/eservlet/* from Apache to Tomcat -- I am
 aware of that. Now if we set Context path=someuri..., what is
 going to happen to our URI?

http://host:port/contextpath/servletmapping

in your case

http://vh.host.com/someuri/eservlets/myservlet

Mark


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



Re: JkMount and Context path

2006-08-20 Thread Evan J

Ok, that's what I had expected,
http://vh.host.com/someuri/eservlets/myservlet, but in reality, such
URL would produce HTTP 400 which has been puzzling me and I had
assumed I had some misunderstanding of something. But the weird thing
is http://vh.host.com/myapp/eservlets/myservlet works flawlessly so
that's why I was asking whether specifying JkMount would have any
bearing on Context path which seems like it doesn't in this case.
Again, my configration is as following:

httpd.conf:

virtualhost ...
  ServerName vh.host.com
  DocumentRoot /path/to/www

  JkMount /* worker1
  JkMount /*.jsp worker1

/virtualhost

conf/server.xml

Host name=vh.host.com
  appBase=/path/to/vh...


conf/enginename/vh.host.com/myapp.xml:

Context path=someuri
  docBase=/myapp...

Note DocumentRoot of Apache differs from appBase in case Apache
doesn't take over Tomcat's responsibilities of handling servlets and
JSP that has no idea how to handle.

Anyway, your verification has made me more bewildered. Not sure what I
want to hear at this point.



On 8/20/06, Mark Thomas [EMAIL PROTECTED] wrote:

Evan J wrote:
 Yes, I understand that perfectly. What I am asking is what if we
 include a web application Context path, that is Context
 path=someuri Of course, JkMount /*/eservlet/* would relay all
 the request with mywebapp/eservlet/* from Apache to Tomcat -- I am
 aware of that. Now if we set Context path=someuri..., what is
 going to happen to our URI?

http://host:port/contextpath/servletmapping

in your case

http://vh.host.com/someuri/eservlets/myservlet

Mark


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




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



Re: JkMount and Context path

2006-08-20 Thread Mark Thomas
Evan J wrote:
 conf/enginename/vh.host.com/myapp.xml:
 
 Context path=someuri
   docBase=/myapp...

Ahh. Light dawns. It wasn't clear (to me at least) that you were using
a context.xml file. I had assumed you were specifying the context
inside server.xml. Using the configuration above the path will be
ignored and the name of the context.xml file used instead as per
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Which changes my last post to:
http://vh.host.com/myapp/eservlets/myservlet

If you name the file ROOT.xml the the URL becomes:
http://vh.host.com/eservlets/myservlet

HTH,

Mark


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



Re: JkMount and Context path

2006-08-19 Thread Martin Gainty
/*httpd.conf
JkMount maps all JSP (*.jsp) to ajp13 
*/
e.g.
httpd.conf
JkMount /*.jsp ajp13

/*map ajp13 to your webapp docRoot /var/tomcat4/webapps/domain1
VirtualHost *
ServerName domain1.com
ServerAlias www.domain1.com
DocumentRoot /var/tomcat4/webapps/domain1
JkMount /* ajp13
/VirtualHost

/*server.xml maps known webapp docBase /var/tomcat4/webapps/domain to domain 
name(domain1) via this entry*/
Host name=domain1.com debug=0 appBase=webapps unpackWARs=true
Aliaswww.domain1.com/Alias
Logger className=org.apache.catalina.logger.FileLogger
directory=logs prefix=virtual_log1. suffix=.log timestamp=true/
Context path= docBase=/var/tomcat4/webapps/domain1 debug=0 
reloadable=true/
/Host

HTH
M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.




 I've a question regarding the way jk_mod relays requests to Tomcat
 servlets. If I have set my virtualhost to supposedly send requests
 with such JkMount directive URL prefix, /serve/* and /serve/*.jsp,
 then I take it, the only way for jk_mod relays requests for this
 virtualhost to Tomcat web application listening on the other end is
 the actual web application name (or directory where it is located)
 to be serve.
 
 On other hand, if the JkMount directive is /*/eservlets/* (or
 /*/eservlets/*.jsp), then all the web applications that have a servlet
 /eservlets/* mapping are being granted such connection between
 Apache-jk_mod-Tomcat instance. So now, what if we change the web
 application's Context's path, that is Context path=/someuri...,
 then how is the servlet with /eservlets/* mapping is going to be
 accessed?
 
 Would it be http://vh.host.com/someuri/myapp/eservlets/myservlet or
 perhaps, http://vh.host.com/myapp/someuir/eservlets/myservlet
 (assuming the web application name is myapp? In any case, the former
 would produce HTTP 400 and the latter HTTP 404. So obviously Context
 path has no bearing in accessing the servlets, that is
 http://vh.host.com/myapp/eservlets/myservlet works just fine but
 inclusion of someuri would result in HTTP 400. So what is going on?
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: JKMount with Tomcat and Access Restriction

2006-06-02 Thread Mark Thomas
When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this  makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.

This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.

Mark
tomcat-user-owner


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



RE: JkMount

2005-11-03 Thread Nehal Sangoi
Hi All,

I could successfully implement load-balancing in tomcat apache setup. I got
idea from the foll. case.

http://www.junlu.com/msg/189637.html

Do exactly same, what he has tried explaining
It has worked perfectly fine for me.


Regds,
Nehal

-Original Message-
From: Nehal Sangoi [mailto:[EMAIL PROTECTED]
Sent: Monday, October 31, 2005 5:49 PM
To: 'Tomcat Users List'
Subject: RE: JkMount


Hi,

I tried as follows

My workers.properties :

workers.java_home=/usr/j2se
ps=/
worker.list=test1,test2,test3,test4
## TEST1 CONNECTOR
worker.test1.port=
worker.test1.host=xxx.xxx.xxx.xxx
worker.test1.type=ajp13
## TEST2 CONNECTOR
worker.test2.port=
worker.test2.host=xxx.xxx.xxx.xxx
worker.test2.type=ajp13
worker.test2.lbfactor=1
## TEST3 CONNECTOR
worker.test3.port=
worker.test3.host=xxx.xxx.xxx.xxx
worker.test3.type=lb
worker.test3.sticky_session=1
worker.test3.balance_workers=test2

My httpd.conf :

JkMount /example/* test1
JkMount /test/* test2

But, my test2 itself is not loading the URL nw. Also, my test3 worker is not
loadbalancing test2 worker.

Please help.


Regds,
Nehal

-Original Message-
From: SUGAHARA Toshio [mailto:[EMAIL PROTECTED]
Sent: Monday, October 31, 2005 5:11 PM
To: Tomcat Users List
Subject: Re: JkMount


Hi Nehal,

I think you had better use Tomcat load-balancing function
when you use different worker.

See below document;
http://tomcat.apache.org/connectors-doc/howto/workers.html

Regards,

Toshio


 How can i JkMount same URI twice in httpd.conf
 with different worker
 specified?

 e.g. i want to mount /example/* twice using
 different worker name.

 JkMount /example/* worker1
 JkMount /example/* worker2

 But this is not working. How should i configure to
 achieve my motto?


 Regds,
 Nehal



-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]



--
Yahoo! Mail - supported by 10million people
http://pr.mail.yahoo.co.jp/10m/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JkMount

2005-10-31 Thread Nehal Sangoi
Hi,

I tried as follows

My workers.properties :

workers.java_home=/usr/j2se
ps=/
worker.list=test1,test2,test3,test4
## TEST1 CONNECTOR
worker.test1.port=
worker.test1.host=xxx.xxx.xxx.xxx
worker.test1.type=ajp13
## TEST2 CONNECTOR
worker.test2.port=
worker.test2.host=xxx.xxx.xxx.xxx
worker.test2.type=ajp13
worker.test2.lbfactor=1
## TEST3 CONNECTOR
worker.test3.port=
worker.test3.host=xxx.xxx.xxx.xxx
worker.test3.type=lb
worker.test3.sticky_session=1
worker.test3.balance_workers=test2

My httpd.conf :

JkMount /example/* test1
JkMount /test/* test2

But, my test2 itself is not loading the URL nw. Also, my test3 worker is not
loadbalancing test2 worker.

Please help.


Regds,
Nehal

-Original Message-
From: SUGAHARA Toshio [mailto:[EMAIL PROTECTED]
Sent: Monday, October 31, 2005 5:11 PM
To: Tomcat Users List
Subject: Re: JkMount


Hi Nehal,

I think you had better use Tomcat load-balancing function
when you use different worker.

See below document;
http://tomcat.apache.org/connectors-doc/howto/workers.html

Regards,

Toshio


 How can i JkMount same URI twice in httpd.conf
 with different worker
 specified?

 e.g. i want to mount /example/* twice using
 different worker name.

 JkMount /example/* worker1
 JkMount /example/* worker2

 But this is not working. How should i configure to
 achieve my motto?


 Regds,
 Nehal



-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]



--
Yahoo! Mail - supported by 10million people
http://pr.mail.yahoo.co.jp/10m/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JkMount

2005-10-31 Thread SUGAHARA Toshio
Hi Nehal,

See the following comment;

Regards,

Toshio

 Hi,
 
 I tried as follows
 
 My workers.properties :
 
 workers.java_home=/usr/j2se
 ps=/
 worker.list=test1,test2,test3,test4
The workers that are member of load balancer must not
appear in the worker.list directive.
http://tomcat.apache.org/connectors-doc/howto/loadbalancers.html

 ## TEST1 CONNECTOR
 worker.test1.port=
 worker.test1.host=xxx.xxx.xxx.xxx
 worker.test1.type=ajp13
 ## TEST2 CONNECTOR
 worker.test2.port=
 worker.test2.host=xxx.xxx.xxx.xxx
 worker.test2.type=ajp13
 worker.test2.lbfactor=1
 ## TEST3 CONNECTOR
 worker.test3.port=
 worker.test3.host=xxx.xxx.xxx.xxx
You should remove the two lines above.

 worker.test3.type=lb
 worker.test3.sticky_session=1
 worker.test3.balance_workers=test2
 
 My httpd.conf :
 
 JkMount /example/* test1
 JkMount /test/* test2
 
 But, my test2 itself is not loading the URL nw.
 Also, my test3 worker is not
 loadbalancing test2 worker.
 
 Please help.
 
 
 Regds,
 Nehal
 
 -Original Message-
 From: SUGAHARA Toshio [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 31, 2005 5:11 PM
 To: Tomcat Users List
 Subject: Re: JkMount
 
 
 Hi Nehal,
 
 I think you had better use Tomcat load-balancing
 function
 when you use different worker.
 
 See below document;

http://tomcat.apache.org/connectors-doc/howto/workers.html
 
 Regards,
 
 Toshio
 
 
  How can i JkMount same URI twice in httpd.conf
  with different worker
  specified?
 
  e.g. i want to mount /example/* twice using
  different worker name.
 
  JkMount /example/* worker1
  JkMount /example/* worker2
 
  But this is not working. How should i configure to
  achieve my motto?
 
 
  Regds,
  Nehal
 
 
 

-
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 
 
 --
 Yahoo! Mail - supported by 10million people
 http://pr.mail.yahoo.co.jp/10m/
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

--
Yahoo! Mail - supported by 10million people
http://pr.mail.yahoo.co.jp/10m/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]