Re: static rules for jk/ajp13

2002-10-16 Thread Glenn Nielsen

For Apache 1.3, mod_jk 1.2, and Tomcat 4.1 I use the following generic config
on a per virtual host basis.  In my case I set the server.xml Host appBase for
each virtual host to their Apache Document root.



DocumentRoot /path/to/apache/document/root/for/host
DirectoryIndex index.html index.htm index.shtml index.jsp

# ... other config directives

# Automatically mounts web applications found in document root
JkAutoAlias /path/to/apache/document/root/for/host
# Log tomcat requests processed by mod_jk with request latency
JkRequestLogFormat "%w %v \"%r\" %U %s %T"

# For JSP
JkMount /*.jsp ajp13
# For Struts
JkMount /*.do ajp13
# For servlets
JkMount /*/servlet/ ajp13
# For the manager app
JkMount /manager/* ajp13


Turner, John wrote:
> Agreed.  In my book, "/servlet/*" is equal to
> "/whatever-name-you-want-to-put-here-it-doesn't-have-to-be-servlet/*". ;)
> 
> I'd rather only send particular requests to Tomcat.  Seems to make more
> sense to me that way...sending everything to Tomcat but setting up some
> convoluted mod_rewrite rules to get Apache to behave seems like more work,
> but that's me.  Messing with Apache also means that you have to hurt
> everything else that Apache is doing to see your config changes.  I haven't
> had much luck with "apachectl graceful".  At least by mapping requests to
> Tomcat, you can take Tomcat up and down without affecting Apache.
> 
> Tastes great, less filling. :)
> 
> John
> 
> 
>>-Original Message-
>>From: Milt Epstein [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, October 15, 2002 2:50 PM
>>To: Tomcat Users List
>>Subject: RE: static rules for jk/ajp13
>>
>>
>>
>>Well, I don't want to argue either :-), but I'm not sure it's really
>>the conventional way.  It used to be -- i.e. using URLs with
>>"/servlet/" in them was the original way to invoke servlets, IIRC.
>>But nowadays, with all the changes to the servlet spec and how
>>servlets are defined and invoked, I believe it's out of favor, and
>>even discouraged.
>>
>>And I'm not sure it's the easiest way either (of course, the question
>>is, "easiest for whom"?  This may be easier for the sysadmin, but then
>>it's not necessarily easier for the developer.  I'm a developer
>>myself, and I've had some conflict with my sysadmin about things like
>>this :-).  Now, with the way things are separated with Tomcat when
>>used in conjunction with Apache, some conflicts naturally arise.
>>Maybe some of the future directions in how this is set up in Tomcat
>>will ease these conflicts.
>>
>>And of course, "easiest" shouldn't necessarily be the main/only
>>criterion to use to decide these things.  Other considerations like
>>security and user-friendliness should probably be more important.  We
>>all saw the security problem that popped up recently related to using
>>URL's with "/servlet/".  Yes, I know there are ways to avoid that
>>problem while still making use of URL's with "/servlet/", but it may
>>just be better to avoid them totally.
>>
>>Anyway, there's my $.02 on it :-).
>>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




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




RE: static rules for jk/ajp13

2002-10-16 Thread Turner, John


Don't you mean the opposite?  Setting forwardAll to false DOESN'T send every
request to Tomcat using JK.  The default is "true".

John

> -Original Message-
> From: Bill Barker [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 16, 2002 4:04 AM
> To: [EMAIL PROTECTED]
> Subject: Re: static rules for jk/ajp13
> 
> 
> There is some support for exclusion rules in jk2 (AFAIK, only 
> from CVS at
> the moment).
> 
> What I do (for the released jk), is to set the ApacheConfig attribute
> forwardAll="false", and then include the result into 
> httpd.conf.  For large
> sites, or those with extremely heavy usage, this may not be desirable.
> 

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




Re: static rules for jk/ajp13

2002-10-16 Thread Bill Barker

There is some support for exclusion rules in jk2 (AFAIK, only from CVS at
the moment).

What I do (for the released jk), is to set the ApacheConfig attribute
forwardAll="false", and then include the result into httpd.conf.  For large
sites, or those with extremely heavy usage, this may not be desirable.

"Mark Eggers" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Frank,
>
> I am not aware of any exclusion rules per sae . . .
> Without having your developers follow some conventions
> as to file location, I think you have a lost cause.
>
> /mde/
>
> just my two cents . . . .
>
> __
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: static rules for jk/ajp13

2002-10-15 Thread Frank Liu


The reason I asked was because we were doing that in our
production (iplanet webserver -> weblogic app server).
With iplanet webserver, you can apparently config it to forward
everything to the appserver, except those html and gif images.

This brings up another question, if we are having problems with
apache -> tomcat, can we use iplanet -> tomcat so that we can
take advantage of "that nice features" in iplanet :)  Is there a connector
for iplanet -> tomcat?

Frank

On Tue, 15 Oct 2002, Turner, John wrote:
>
> Agreed.  In my book, "/servlet/*" is equal to
> "/whatever-name-you-want-to-put-here-it-doesn't-have-to-be-servlet/*". ;)
>
> I'd rather only send particular requests to Tomcat.  Seems to make more
> sense to me that way...sending everything to Tomcat but setting up some
> convoluted mod_rewrite rules to get Apache to behave seems like more work,
> but that's me.  Messing with Apache also means that you have to hurt
> everything else that Apache is doing to see your config changes.  I haven't
> had much luck with "apachectl graceful".  At least by mapping requests to
> Tomcat, you can take Tomcat up and down without affecting Apache.
>
> Tastes great, less filling. :)
>
> John
>
> > -Original Message-
> > From: Milt Epstein [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 15, 2002 2:50 PM
> > To: Tomcat Users List
> > Subject: RE: static rules for jk/ajp13
> >
> >
> >
> > Well, I don't want to argue either :-), but I'm not sure it's really
> > the conventional way.  It used to be -- i.e. using URLs with
> > "/servlet/" in them was the original way to invoke servlets, IIRC.
> > But nowadays, with all the changes to the servlet spec and how
> > servlets are defined and invoked, I believe it's out of favor, and
> > even discouraged.
> >
> > And I'm not sure it's the easiest way either (of course, the question
> > is, "easiest for whom"?  This may be easier for the sysadmin, but then
> > it's not necessarily easier for the developer.  I'm a developer
> > myself, and I've had some conflict with my sysadmin about things like
> > this :-).  Now, with the way things are separated with Tomcat when
> > used in conjunction with Apache, some conflicts naturally arise.
> > Maybe some of the future directions in how this is set up in Tomcat
> > will ease these conflicts.
> >
> > And of course, "easiest" shouldn't necessarily be the main/only
> > criterion to use to decide these things.  Other considerations like
> > security and user-friendliness should probably be more important.  We
> > all saw the security problem that popped up recently related to using
> > URL's with "/servlet/".  Yes, I know there are ways to avoid that
> > problem while still making use of URL's with "/servlet/", but it may
> > just be better to avoid them totally.
> >
> > Anyway, there's my $.02 on it :-).
> >
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>


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




RE: static rules for jk/ajp13

2002-10-15 Thread Turner, John


Agreed.  In my book, "/servlet/*" is equal to
"/whatever-name-you-want-to-put-here-it-doesn't-have-to-be-servlet/*". ;)

I'd rather only send particular requests to Tomcat.  Seems to make more
sense to me that way...sending everything to Tomcat but setting up some
convoluted mod_rewrite rules to get Apache to behave seems like more work,
but that's me.  Messing with Apache also means that you have to hurt
everything else that Apache is doing to see your config changes.  I haven't
had much luck with "apachectl graceful".  At least by mapping requests to
Tomcat, you can take Tomcat up and down without affecting Apache.

Tastes great, less filling. :)

John

> -Original Message-
> From: Milt Epstein [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 15, 2002 2:50 PM
> To: Tomcat Users List
> Subject: RE: static rules for jk/ajp13
> 
> 
> 
> Well, I don't want to argue either :-), but I'm not sure it's really
> the conventional way.  It used to be -- i.e. using URLs with
> "/servlet/" in them was the original way to invoke servlets, IIRC.
> But nowadays, with all the changes to the servlet spec and how
> servlets are defined and invoked, I believe it's out of favor, and
> even discouraged.
> 
> And I'm not sure it's the easiest way either (of course, the question
> is, "easiest for whom"?  This may be easier for the sysadmin, but then
> it's not necessarily easier for the developer.  I'm a developer
> myself, and I've had some conflict with my sysadmin about things like
> this :-).  Now, with the way things are separated with Tomcat when
> used in conjunction with Apache, some conflicts naturally arise.
> Maybe some of the future directions in how this is set up in Tomcat
> will ease these conflicts.
> 
> And of course, "easiest" shouldn't necessarily be the main/only
> criterion to use to decide these things.  Other considerations like
> security and user-friendliness should probably be more important.  We
> all saw the security problem that popped up recently related to using
> URL's with "/servlet/".  Yes, I know there are ways to avoid that
> problem while still making use of URL's with "/servlet/", but it may
> just be better to avoid them totally.
> 
> Anyway, there's my $.02 on it :-).
> 

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




RE: static rules for jk/ajp13

2002-10-15 Thread Milt Epstein

On Tue, 15 Oct 2002, Turner, John wrote:

> I wasn't arguing, merely pointing out as an answer to your question
> that either way requires work from a configuration standpoint.  You
> either need generic Apache rules and specific Tomcat rules, or
> specific Apache rules (like with mod_rewrite) and generic Tomcat
> rules.
>
> There is no such thing as a free lunch, either way you will need to
> configure things manually.  In my opinion, especially if you are the
> sys-admin, the easiest way (and the conventional way) is to setup
> the rules as I posted and tell your developers that is how it should
> be. But, if you're looking for more work for yourself, you are
> welcome to do it however you wish.
[ ... ]

Well, I don't want to argue either :-), but I'm not sure it's really
the conventional way.  It used to be -- i.e. using URLs with
"/servlet/" in them was the original way to invoke servlets, IIRC.
But nowadays, with all the changes to the servlet spec and how
servlets are defined and invoked, I believe it's out of favor, and
even discouraged.

And I'm not sure it's the easiest way either (of course, the question
is, "easiest for whom"?  This may be easier for the sysadmin, but then
it's not necessarily easier for the developer.  I'm a developer
myself, and I've had some conflict with my sysadmin about things like
this :-).  Now, with the way things are separated with Tomcat when
used in conjunction with Apache, some conflicts naturally arise.
Maybe some of the future directions in how this is set up in Tomcat
will ease these conflicts.

And of course, "easiest" shouldn't necessarily be the main/only
criterion to use to decide these things.  Other considerations like
security and user-friendliness should probably be more important.  We
all saw the security problem that popped up recently related to using
URL's with "/servlet/".  Yes, I know there are ways to avoid that
problem while still making use of URL's with "/servlet/", but it may
just be better to avoid them totally.

Anyway, there's my $.02 on it :-).


> > -Original Message-
> > From: Frank Liu [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 14, 2002 6:37 PM
> > To: Tomcat Users List
> > Subject: RE: static rules for jk/ajp13
> >
> >
> >
> > On Mon, 14 Oct 2002, Turner, John wrote:
> > >
> > > Since Tomcat only deals with JSP and servlets, this should
> > be all you need:
> > >
> > > JkMount /*.jsp ajp13
> > > JkMount /servlet/* ajp13
> > >
> > > What else would Tomcat serve?
> >
> > I am not a developer, but sometimes am asked by our developers to add
> > JkMount /myapp/Admin  ajp13
> > JkMount /myapp/Read   ajp13
> > ...
> > Apparently, they are mapping the servlets with a more
> > "readable" names.
> > I will be happier if everyone uses "servlet" in the URL. so I can just
> > JkMount /myapp/servlet/*
> > but such is life.
> >
> > Anyway, instead of arguing whether tomcat only serves *.jsp
> > and /servlet,
> > is there an answer to my original question?
> >
> > Frank
>

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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




RE: static rules for jk/ajp13

2002-10-15 Thread Turner, John


I wasn't arguing, merely pointing out as an answer to your question that
either way requires work from a configuration standpoint.  You either need
generic Apache rules and specific Tomcat rules, or specific Apache rules
(like with mod_rewrite) and generic Tomcat rules.

There is no such thing as a free lunch, either way you will need to
configure things manually.  In my opinion, especially if you are the
sys-admin, the easiest way (and the conventional way) is to setup the rules
as I posted and tell your developers that is how it should be. But, if
you're looking for more work for yourself, you are welcome to do it however
you wish.

I apologize for replying to your post and trying to help.

John

> -Original Message-
> From: Frank Liu [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 6:37 PM
> To: Tomcat Users List
> Subject: RE: static rules for jk/ajp13
> 
> 
> 
> On Mon, 14 Oct 2002, Turner, John wrote:
> >
> > Since Tomcat only deals with JSP and servlets, this should 
> be all you need:
> >
> > JkMount /*.jsp ajp13
> > JkMount /servlet/* ajp13
> >
> > What else would Tomcat serve?
> 
> I am not a developer, but sometimes am asked by our developers to add
> JkMount /myapp/Admin  ajp13
> JkMount /myapp/Read   ajp13
> ...
> Apparently, they are mapping the servlets with a more 
> "readable" names.
> I will be happier if everyone uses "servlet" in the URL. so I can just
> JkMount /myapp/servlet/*
> but such is life.
> 
> Anyway, instead of arguing whether tomcat only serves *.jsp 
> and /servlet,
> is there an answer to my original question?
> 
> Frank

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




Re: static rules for jk/ajp13

2002-10-14 Thread Matthew Hannigan

On Mon, Oct 14, 2002 at 10:37:29PM +, Frank Liu wrote:
> > > The docs I can find all talks the other way around: default to apache
> > > and only pass to tomcat when you explicitly ask for certain urls.

There was an posting on this list a few weeks ago
which showed a way to do this.

Essentially, (from memory) you make Tomcat the default:

JkMount / ajp13
JkMount /* ajp13

and then provide rewrite (mod_rewrite) rules to force
specific files to Apache. (Or was it ?)

I'll try and find the post if you cannot find it.

I have found that getting around inbuilt module handlers
is a little problematic; you probably want to put
mod_jk immediately after the ClearModule command in the
httpd.conf.


Regards,
Matt


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: static rules for jk/ajp13

2002-10-14 Thread Mark Eggers

Frank,

I am not aware of any exclusion rules per sae . . . 
Without having your developers follow some conventions
as to file location, I think you have a lost cause.

/mde/

just my two cents . . . .

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: static rules for jk/ajp13

2002-10-14 Thread Frank Liu


On Mon, 14 Oct 2002, Turner, John wrote:
>
> Since Tomcat only deals with JSP and servlets, this should be all you need:
>
> JkMount /*.jsp ajp13
> JkMount /servlet/* ajp13
>
> What else would Tomcat serve?

I am not a developer, but sometimes am asked by our developers to add
JkMount /myapp/Admin  ajp13
JkMount /myapp/Read   ajp13
...
Apparently, they are mapping the servlets with a more "readable" names.
I will be happier if everyone uses "servlet" in the URL. so I can just
JkMount /myapp/servlet/*
but such is life.

Anyway, instead of arguing whether tomcat only serves *.jsp and /servlet,
is there an answer to my original question?

Frank

>
> John
>
> > -Original Message-
> > From: Frank Liu [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, October 14, 2002 4:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: static rules for jk/ajp13
> >
> >
> >
> > How do I config httpd.conf so that apache will pass everything
> > to tomcat except *.gif and *.html/*.htm ?
> > Basically I want apache to default to pass to tomcat unless
> > otherwise told.
> > The docs I can find all talks the other way around: default to apache
> > and only pass to tomcat when you explicitly ask for certain urls.
> >
> > Frank
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>


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




RE: static rules for jk/ajp13

2002-10-14 Thread Raj Mettai

how do I get apache to direct all directory links to tomcat for default document...

ex:  http://localhost/example  should go to http://localhost/example/index.jsp

I have following JkMount Config..

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

I want to use apache for html and images, so I dont want to use JkMount /example/* 
ajp13

any thoughts 

thanks

-Raj


>>> [EMAIL PROTECTED] 10/14/02 04:24PM >>>

Since Tomcat only deals with JSP and servlets, this should be all you need:

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

What else would Tomcat serve?  

John

> -Original Message-
> From: Frank Liu [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: static rules for jk/ajp13
> 
> 
> 
> How do I config httpd.conf so that apache will pass everything
> to tomcat except *.gif and *.html/*.htm ?
> Basically I want apache to default to pass to tomcat unless 
> otherwise told.
> The docs I can find all talks the other way around: default to apache
> and only pass to tomcat when you explicitly ask for certain urls.
> 
> Frank
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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



RE: static rules for jk/ajp13

2002-10-14 Thread Mark Eggers

If you are running Cocoon or a Cocoon-based
application, you might also want to add the following:

JkMount /cocoon/* ajp13

This will dump everything in the Cocoon directory to
Tomcat which will use the Cocoon webapp to deal with
things.  If you have static files (such as html or
images) then you could put them outside this diretory
tree where your web server will serve them up.

/mde/

just my two cents . . . .

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: static rules for jk/ajp13

2002-10-14 Thread Turner, John


Since Tomcat only deals with JSP and servlets, this should be all you need:

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

What else would Tomcat serve?  

John

> -Original Message-
> From: Frank Liu [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 4:07 PM
> To: [EMAIL PROTECTED]
> Subject: static rules for jk/ajp13
> 
> 
> 
> How do I config httpd.conf so that apache will pass everything
> to tomcat except *.gif and *.html/*.htm ?
> Basically I want apache to default to pass to tomcat unless 
> otherwise told.
> The docs I can find all talks the other way around: default to apache
> and only pass to tomcat when you explicitly ask for certain urls.
> 
> Frank
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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




static rules for jk/ajp13

2002-10-14 Thread Frank Liu


How do I config httpd.conf so that apache will pass everything
to tomcat except *.gif and *.html/*.htm ?
Basically I want apache to default to pass to tomcat unless otherwise told.
The docs I can find all talks the other way around: default to apache
and only pass to tomcat when you explicitly ask for certain urls.

Frank



--
To unsubscribe, e-mail:   
For additional commands, e-mail: