You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Milt Epstein <me...@uiuc.edu> on 2002/06/25 06:52:02 UTC

Separating Tomcat and Apache configuration

We're trying to come up with a way to use Tomcat integrated with
Apache in our production enviroment.  In this environment, we have
"service" managers and "system" managers.  There may be multiple
services (and hence multiple service managers) per machine.  And
there'd be one Tomcat instance per service.  The management of Tomcat
would be the responsibility of the service managers, while the
management of Apache would be the responsibility of the system
manager.

The ideal case would be if these duties could be totally separated.
But we've been having problems coming up with an arrangement that
allows this.  The problem is that the connector directives (whether it
be mod_jk or mod_webapp) that tell Apache what URLs to forward to a
particular Tomcat instance must be in Apaches httpd.conf file (which
is under control of the system manager, recall).  This is a problem
when the service manager wants to deploy new web applications.

Some comments:

1. We could have httpd.conf "include" a file under each service
   manager's control.  But this is undesirable.

2. If the connector directives could be specified in .htaccess files,
   this would give us the control we need.  But apparently this is not
   possible.  It's my understanding that when a directive is created,
   it is specified what context it can be used in, where server,
   virtualhost, and htaccess are some of the possible contexts.  Is
   there some special reason mod_jk and mod_webapp directives are not
   allowed in htaccess context?  What would it take to add this?  Is
   this something the tomcat developers would consider doing.

3. What exactly is the JkAutoMount directive, and is it implemented in
   any connector?  I saw this, and it looked it could be used to have
   the web server (Apache) query the servlet container (Tomcat) was to
   what URL's/contexts there were.  But details were sketchy.  But if
   this mechanism did exist, we might be able to use to do what we
   want.

4. I don't know exactly how the Tomcat manager application handles
   installing/starting webapps, but if it works when Tomcat is
   integrated with Apache, this too might allow us to do what want.
   However, I've recently gathered that this mechanism only works with
   Tomcat standalone, so it probably won't help us.

Any info that might helps us get closer to what we're trying to do
would surely be appreciated.  That might be elaboration/clarification
of some of the ideas mentioned above, or some other ideas I didn't
mention.

Thanks!

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Separating Tomcat and Apache configuration

Posted by co...@covalent.net.
On Mon, 24 Jun 2002, Milt Epstein wrote:

> 1. We could have httpd.conf "include" a file under each service
>    manager's control.  But this is undesirable.

I think it's not a bad idea - we already have some code that will
generate httpd.conf fragments from a web.xml, and that would 
require the fragment to be included in the <Host> and <Location> 
container.

Why do you think this is a bad idea ?

( the generators are for jk2's apache-specific configuration,
using JkUriSet ).


> 2. If the connector directives could be specified in .htaccess files,
>    this would give us the control we need.  But apparently this is not
>    possible.  It's my understanding that when a directive is created,

I think it is possible with jk2, but I never tried.

mod_jk2 can use plain Apache directive - all it needs is JkUriSet in
a <Location>. 

If it doesn't work, I think it is possible to fix it - looking forward
to patches :-)

>    allowed in htaccess context?  What would it take to add this?  Is
>    this something the tomcat developers would consider doing.

I won't do it - lack of time. I think it should work with the current
code, but it may require some tricks.


> 3. What exactly is the JkAutoMount directive, and is it implemented in
>    any connector?  I saw this, and it looked it could be used to have

It is not curently implemented. It was a proposal, and unfortunately 
we didn't yet got it ported to jk2. 

The directive is supposed to use the ajp channel to ask tomcat about
the mappings. This worked with 3.3, but not with coyote and 4.0
( since we don't have the callbacks yet ).

I think generating the configs at deploy time is much better
suited for a production server, it gives you a chance to review
and tune the settings - and it is IMHO cleaner.

Some people believe it is simpler to just use the protocol - and 
this option may be implemented ( but I would say 5.0.x ). We need
at least the mapping callbacks in coyote to be implemented in 4.x.


> 4. I don't know exactly how the Tomcat manager application handles
>    installing/starting webapps, but if it works when Tomcat is
>    integrated with Apache, this too might allow us to do what want.
>    However, I've recently gathered that this mechanism only works with
>    Tomcat standalone, so it probably won't help us.

Again, my personal opinion is that Apache config should be generated
at deploy time, not received every time when apache start. 

As with all other things in tomcat, other people have different
opinions and it's likely they'll implement them ( Henri is a big
supporter of this feature ). 

Tomcat3.3 generates Apache config fragments at startup,
using the discovered apps - which is something in the middle.
It also have some magic flags to generate configs without starting,
which is closer to what I want.

Costin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Webapp and SSL?

Posted by Sam Ewing <ja...@yahoo.com>.
What do we need to do for using SSL when we have a
webapp connector? 

Is all we have to do revolve around getting Apache to
handle SSL? Any special webapp directives in
httpd.conf? What about server.xml changes- do we only
need to set scheme to https and secure to true?
Anything else?

tx,



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Bugs in deploy task?

Posted by Sam Ewing <ja...@yahoo.com>.
Finally go the deploy ant task to work- cleared up a
lot of my misunderstanding. I found two bugs (or are
they mistakes on my part??) though:

1. The only path accepted by the ant deploy task is a
URL type (see sample below)

<target name="deploy" description="Deploy web
application"
          depends="build">
    <deploy url="${url}" username="${username}"
password="${password}"
            path="${path}"
war="http://localhost/myApp.war"/>
  </target>
   
2. The undeploy task removes the war file all right,
but the server.xml entry that is added is not removed.



--- Sam Ewing <ja...@yahoo.com> wrote:
> I remember seeing a bug sometime back on deployed
> applications not persisting across Tomcat restarts.
> Has this been fixed?
> 
> The deployed app is copied into CATALINA_HOME/work
> which is not loaded up by Tomcat- so how does Tomcat
> find the context again? Is server.xml modified?
> 
> I haven't been able to get my deploy ant task to
> work
> so can't try it out (keep getting 
> java.net.UnknownHostException for deploy- all other
> tasks work fine :(- but that is another issue.)
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Deployed applications persisting across Tomcat restarts

Posted by Sam Ewing <ja...@yahoo.com>.
I remember seeing a bug sometime back on deployed
applications not persisting across Tomcat restarts.
Has this been fixed?

The deployed app is copied into CATALINA_HOME/work
which is not loaded up by Tomcat- so how does Tomcat
find the context again? Is server.xml modified?

I haven't been able to get my deploy ant task to work
so can't try it out (keep getting 
java.net.UnknownHostException for deploy- all other
tasks work fine :(- but that is another issue.)

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fix for bug #8331??

Posted by Pier Fumagalli <pi...@betaversion.org>.
Sam Ewing <ja...@yahoo.com> wrote:

> Hi Pier,
> 
> Yes, I am building on Linux (Redhat 7.3).

Aw... I know there are some issues with APR and ATOMICS on Linux (or was it
Solaris? Need to investigate).

> I see a 
> tempval="--enable-static --disable-shared
> --disable-threads"
> in the configure script.. do I knock of the
> disable-threads?

Quick fix? Edit the configure script and when you see the line
  tmpval=".... --disable-threads"
Change the disable into enable.. :)

Longer fix, edit configure.in, patch in the same way, re run
support/buildconf.sh and you'll get a new configure script...

> Do you mean my apr_config (I dont see a apr_config.h
> being created..).

Sorry, me dumb... In the APR directory, it's a file called include/apr.h
(without the config part)...

    Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fix for bug #8331??

Posted by Sam Ewing <ja...@yahoo.com>.
Hi Pier,

 Yes, I am building on Linux (Redhat 7.3).

 I see a 
tempval="--enable-static --disable-shared
--disable-threads"
 in the configure script.. do I knock of the
disable-threads?

 Do you mean my apr_config (I dont see a apr_config.h
being created..).

 It looks like this:
"
prefix="/usr/local"
exec_prefix="${prefix}"
bindir="${exec_prefix}/bin"
libdir="/home/sam/jakarta-tomcat-connectors/webapp/objects"
datadir="${prefix}/share"
installbuilddir="${prefix}/share/build"
includedir="${prefix}/include"

CC="gcc"
CPP="gcc -E"
SHELL="/bin/sh"
CPPFLAGS="-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE"
CFLAGS="-g -O2"
LDFLAGS=""
LIBS="-lm -lcrypt -lnsl  -ldl"
EXTRA_INCLUDES=""
SHLIBPATH_VAR="LD_LIBRARY_PATH"
APR_SOURCE_DIR="/home/sam/jakarta-tomcat-connectors/webapp/apr"
APR_SO_EXT="lo"
APR_LIB_TARGET="-rpath \$(libdir) \$\$objects"

show_usage()
...
"

 Thanks!

 
> I know. The webapp configure actually forces threads
> to be disabled because
> of the way in which they don't work that great with
> Apache 1.3. But of
> course this disables ATOMICS, which is not what you
> want...
> 
> It is really odd, because all the atomics code I can
> see is actually
> ifdef(ed) out with APR_HAS_THREADS, but somehow it
> gets foobared up
> somewhere...
> 
> UNLESS, don't tell me you're building it on Linux...
> Can you send me over
> your apr_config.h file after configure is run?
> 
>     Pier
> 


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fix for bug #8331??

Posted by Pier Fumagalli <pi...@betaversion.org>.
Sam Ewing <ja...@yahoo.com> wrote:

> Thanks Pier- its working with Apache 2.0 now.

Toldya! :)

> How do I solve the apache 1.3 problem though?
> 
> I tried rebuilding the connector as
> 
> $ ./configure --with-apxs=/path/apache1.3/bin/apxs
> --enable-threads
> $ make
> 
> But I still get the same problem..

I know. The webapp configure actually forces threads to be disabled because
of the way in which they don't work that great with Apache 1.3. But of
course this disables ATOMICS, which is not what you want...

It is really odd, because all the atomics code I can see is actually
ifdef(ed) out with APR_HAS_THREADS, but somehow it gets foobared up
somewhere...

UNLESS, don't tell me you're building it on Linux... Can you send me over
your apr_config.h file after configure is run?

    Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fix for bug #8331??

Posted by Sam Ewing <ja...@yahoo.com>.
Thanks Pier- its working with Apache 2.0 now.

How do I solve the apache 1.3 problem though?

I tried rebuilding the connector as

$ ./configure --with-apxs=/path/apache1.3/bin/apxs
--enable-threads
$ make

But I still get the same problem..

> That's because the latest APR has introduced a
> "flaw" (doesn�t support
> atomics if --disable-threads - and that's how we
> compile APR).


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: webapp- who handles static content: Tomcat or Apache (* OFF TOPIC *)

Posted by Pier Fumagalli <pi...@betaversion.org>.
"Arshad Mahmood" <ar...@compuvision.co.uk> wrote:

> Interesting idea to split the static content onto a different server.
> 
> Does anyone know how a browser like IE handles this kind of situation, I
> know that with HTTP 1.1 the server will leave the connection open for
> further requests so that images/styles, etc should be able to go through the
> same connection as the original call.
> 
> Will IE open a single connection to "images.foo.com" to retrieve all the
> images on a page, or will it open a new connection per image.
> 
> What happens with an SSL based page, will I get annoying messages because I
> am getting insecure content. I assume I will have to put an SSL certificate
> on the image server as well.

When using SSL, or if you want to use keepalive fully, the optimal thing to
do for "convenience" would be to do what we used to do @ VNU 5 months ago,
the application is somewhere, and images/static are under a certain path
(for instance in our case /v6_....) . The browser can reuse the connection,
and the server can use the same certificate for both...

The "problem" we're solving by splitting the servers is splitting the load
as well. As you might know, on our www server, when we separated out images
the load went from an average of 3.50 daily, to 1.50, and the images server
is just an very very basic and skinny HTTPd 2.0 with Worker... Far less
heavy than the full web server on the main www... :)

    Pier


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: webapp- who handles static content: Tomcat or Apache (* OFF TOPIC *)

Posted by Arshad Mahmood <ar...@compuvision.co.uk>.
Interesting idea to split the static content onto a different server.

Does anyone know how a browser like IE handles this kind of situation, I
know that with HTTP 1.1 the server will leave the connection open for
further requests so that images/styles, etc should be able to go through the
same connection as the original call.

Will IE open a single connection to "images.foo.com" to retrieve all the
images on a page, or will it open a new connection per image.

What happens with an SSL based page, will I get annoying messages because I
am getting insecure content. I assume I will have to put an SSL certificate
on the image server as well.

Regards.

----- Original Message -----
From: "Pier Fumagalli" <pi...@betaversion.org>
To: "Tomcat Developers List" <to...@jakarta.apache.org>
Sent: Thursday, July 11, 2002 2:00 AM
Subject: Re: webapp- who handles static content: Tomcat or Apache


> Pier Fumagalli <pi...@betaversion.org> wrote:
>
> > Cute... You can have some... Visit your local tobacconist.
> > Anyhow, you'll see my reasoning when the article gets published. Few
other
> > folks having the same problems we do (very high loads + servlets) don't
have
> > the same problem as well.... It's actually way easier and "better" (in
terms
> > of what solutions it allows you to have), to move them away entirely
from
> > the web application at all...
> >
> > People doing GIFs HTMLs and CCS are (in our case), completely separate
from
> > JSP/Servlet writers, so I don't even need to give them acceess to the
web
> > application files... They can't overwrite or even "touch" any of the
dynamic
> > content...
>
> Finally the article (and together with it its full response) is up...
>
>     http://www.onjava.com/
>     http://www.onjava.com/pub/a/onjava/2002/07/17/web.html
>
> Page one, at the bottom.
>
>     Pier
>
> --
> [Perl] combines all the worst aspects of C and Lisp:  a billion of
different
> sublanguages in  one monolithic executable.  It combines the power of C
with
> the readability of PostScript. [Jamie Zawinski - DNA Lounge - San
Francisco]
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: deploy manager task in ant

Posted by "Craig R. McClanahan" <cr...@apache.org>.
This kind of question is better addressed to the TOMCAT-USER mailing list.

On Sat, 13 Jul 2002, Sam Ewing wrote:

> Date: Sat, 13 Jul 2002 15:45:45 -0700 (PDT)
> From: Sam Ewing <ja...@yahoo.com>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: deploy manager task in ant
>
> I have my deploy target in build.xml as:
>
> <!-- build target results in a myapp.jar file -->
> <target name="deploy" depends="build">
>     <deploy url="${url}" username="${username}"
> password="${password}"
>             path="${path}"
> war="file://${build}/myapp.war"/>
>   </target>
>
> I get back an error from the ant script:
>
> file:C:/users/sam/build.xml:78:
> java.net.UnknownHostException: D
>

It's likely that the URL you are passing in as the "${url}" parameter
includes a name not recognized by your DNS server.  Another common
possibility is that you've forgotten to actually specify an Ant property
replacement value for it -- you can check for that by sticking something
like:

  <echo message="URL is ${url}"/>

immediately before the <deploy> task.  The value should be the URL of the
manager webapp, typically something like "http://localhost:8080/manager".

> (Line #78 is the line that has the path= and war=
> lines)
>
> Any help appreciated!
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


deploy manager task in ant

Posted by Sam Ewing <ja...@yahoo.com>.
I have my deploy target in build.xml as: 

<!-- build target results in a myapp.jar file -->
<target name="deploy" depends="build">
    <deploy url="${url}" username="${username}"
password="${password}"
            path="${path}"
war="file://${build}/myapp.war"/>
  </target>

I get back an error from the ant script:

file:C:/users/sam/build.xml:78:
java.net.UnknownHostException: D

(Line #78 is the line that has the path= and war=
lines)

Any help appreciated!

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: install webapp task (4.1)

Posted by "Craig R. McClanahan" <cr...@apache.org>.
This kind of question is better addressed to the TOMCAT-USER mailing list.

On Sat, 13 Jul 2002, Sam Ewing wrote:

> Date: Sat, 13 Jul 2002 15:51:17 -0700 (PDT)
> From: Sam Ewing <ja...@yahoo.com>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: install webapp task (4.1)
>
> In tomcat 4.1, can the install task be used to install
> to a remote machine? (i.e. war file not on the machine
> that runs tomcat..)
>

The install task must be run on the same machine, because you're passing a
file pathname.  However, because there is no copying involved, it runs
faster and is more convenient during development.

The deploy task can be used for a remote machine, because it uploads the
WAR file as part of the request.  However, you must use a client program
for this (such as the custom Ant task that's described in the docs)
because it requires the use of an HTTP PUT operation to upload the WAR.

> tx
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


install webapp task (4.1)

Posted by Sam Ewing <ja...@yahoo.com>.
In tomcat 4.1, can the install task be used to install
to a remote machine? (i.e. war file not on the machine
that runs tomcat..)

tx

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: webapp- who handles static content: Tomcat or Apache

Posted by Pier Fumagalli <pi...@betaversion.org>.
Pier Fumagalli <pi...@betaversion.org> wrote:

> Cute... You can have some... Visit your local tobacconist.
> Anyhow, you'll see my reasoning when the article gets published. Few other
> folks having the same problems we do (very high loads + servlets) don't have
> the same problem as well.... It's actually way easier and "better" (in terms
> of what solutions it allows you to have), to move them away entirely from
> the web application at all...
> 
> People doing GIFs HTMLs and CCS are (in our case), completely separate from
> JSP/Servlet writers, so I don't even need to give them acceess to the web
> application files... They can't overwrite or even "touch" any of the dynamic
> content...

Finally the article (and together with it its full response) is up...

    http://www.onjava.com/
    http://www.onjava.com/pub/a/onjava/2002/07/17/web.html

Page one, at the bottom.

    Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: webapp- who handles static content: Tomcat or Apache

Posted by Pier Fumagalli <pi...@betaversion.org>.
Bill Barker <wb...@wilshire.com> wrote:

> 
> ----- Original Message -----
> From: "Pier Fumagalli" <pi...@betaversion.org>
> To: "Tomcat Developers List" <to...@jakarta.apache.org>
> Sent: Sunday, July 07, 2002 4:04 PM
> Subject: Re: webapp- who handles static content: Tomcat or Apache
> 
> 
>> Sam Ewing <ja...@yahoo.com> wrote:
>> 
>>> I read elsewhere that that mod_webapp fowarded
>>> requests for static resources to Tomcat (instead of
>>> Apache). Is this fixed? If not, are there workarounds?
>> 
>> It is forwarding requests, and it's definitely the last of my priorities
>> to "fix" (actually I don't even consider it a "bug" anymore).
>> 
> 
> I want some of what he is smoking ;-).

Cute... You can have some... Visit your local tobacconist.
Anyhow, you'll see my reasoning when the article gets published. Few other
folks having the same problems we do (very high loads + servlets) don't have
the same problem as well.... It's actually way easier and "better" (in terms
of what solutions it allows you to have), to move them away entirely from
the web application at all...

People doing GIFs HTMLs and CCS are (in our case), completely separate from
JSP/Servlet writers, so I don't even need to give them acceess to the web
application files... They can't overwrite or even "touch" any of the dynamic
content...

    Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: webapp- who handles static content: Tomcat or Apache

Posted by Bill Barker <wb...@wilshire.com>.
----- Original Message -----
From: "Pier Fumagalli" <pi...@betaversion.org>
To: "Tomcat Developers List" <to...@jakarta.apache.org>
Sent: Sunday, July 07, 2002 4:04 PM
Subject: Re: webapp- who handles static content: Tomcat or Apache


> Sam Ewing <ja...@yahoo.com> wrote:
>
> > I read elsewhere that that mod_webapp fowarded
> > requests for static resources to Tomcat (instead of
> > Apache). Is this fixed? If not, are there workarounds?
>
> It is forwarding requests, and it's definitely the last of my priorities
to
> "fix" (actually I don't even consider it a "bug" anymore).
>

I want some of what he is smoking ;-).

> I wrote an article for OnJava.COM about it. It should be published fairly
> soon (this week AFAIK).
>
>     Pier
>
> --
> [Perl] combines all the worst aspects of C and Lisp:  a billion of
different
> sublanguages in  one monolithic executable.  It combines the power of C
with
> the readability of PostScript. [Jamie Zawinski - DNA Lounge - San
Francisco]
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: webapp- who handles static content: Tomcat or Apache

Posted by Pier Fumagalli <pi...@betaversion.org>.
Sam Ewing <ja...@yahoo.com> wrote:

> I read elsewhere that that mod_webapp fowarded
> requests for static resources to Tomcat (instead of
> Apache). Is this fixed? If not, are there workarounds?

It is forwarding requests, and it's definitely the last of my priorities to
"fix" (actually I don't even consider it a "bug" anymore).

I wrote an article for OnJava.COM about it. It should be published fairly
soon (this week AFAIK).

    Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


webapp- who handles static content: Tomcat or Apache

Posted by Sam Ewing <ja...@yahoo.com>.
I read elsewhere that that mod_webapp fowarded
requests for static resources to Tomcat (instead of
Apache). Is this fixed? If not, are there workarounds?

Tx,

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fix for bug #8331??

Posted by Pier Fumagalli <pi...@betaversion.org>.
Sam Ewing <ja...@yahoo.com> wrote:

> Hi Pier,
> 
> Did just that. Apachectl configtest gives a 'Syntax
> OK'; however when I start apache, 'apachectl start'
> fails with the following error:
> 
> "
> (13)Permission denied: make_sock: could not bind to
> address 0.0.0.0:80
> no listening sockets available, shutting down
> "

Shut down Apache, don't restart it, and make sure all processes are out.
There are some issues when shutting down ATM, some of the children need to
be killed -9 by the parent process.

> From your config directives, I assumes that you are
> Apache 1.3 ('libexec' instead of 'modules'). I tried
> to move to Apache 1.3;  but I get the following
> errors:
> "
> Syntax error on line 206 of
> /home/sam/http/conf/httpd.conf:
> Cannot load /home/sam/http/libexec/mod_webapp.so into
> server: /home/sam/http/libexec/mod_webapp.so:
> undefined symbol: apr_atomic_set
> ./apachectl start: httpd could not be started
> "

That's because the latest APR has introduced a "flaw" (doesn¹t support
atomics if --disable-threads - and that's how we compile APR).

> Help!!

Apache 2.0 works no problem... The permission denied you're getting comes
from somewhere else...

    Pier


> --- Pier Fumagalli <pi...@betaversion.org> wrote:
>> Sam Ewing <ja...@yahoo.com> wrote:
>> 
>>> I am on Apache 2.0.39 and Tomcat 4.1.3, and the
>> latest
>>> webapp connector code, fresh from CVS.
>>> 
>>> I am facing a "Invalid virtual host name" error
>> from
>>> Apache with this configuration:
>>> 
>>>  LoadModule webapp_module libexec/mod_webapp.so
>>>  WebAppConnection conn     warp localhost:8008
>>>  WebAppDeploy     examples conn /examples
>>> 
>>> This seems to be identical to bug#8331. Any fixes?
>>> 
>>> 
>> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8331
>> 
>> I runs on my own system here... Did you remember to
>> put the "ServerName"
>> directive in your virtual host? This is how my
>> httpd.conf (relevant part of
>> virtualhosts looks like):
>> 
>> [...]
>> LoadModule webapp_module libexec/mod_webapp.so
>> [...]
>> ServerName blossom.betaversion.org:80
>> [...]
>> WebAppConnection local warp 127.0.0.1:8008
>> [...]
>> NameVirtualHost *
>> 
>> <VirtualHost *>
>>     ServerName blossom.betaversion.org:80
>>     # DocumentRoot [inherited from main]
>>     # ServerAdmin [inherited from main]
>> 
>>     WebAppInfo /webapp-status
>>     [...]
>> </VirtualHost>
>> 
>> <VirtualHost *>
>>     ServerName www1.blossom:80
>>     DocumentRoot
>> /Library/Services/Apache2/Sites/www1
>>     # ServerAdmin [inherited from main]
>> 
>>     WebAppDeploy     svnview local /svnview
>>     [...]
>> </VirtualHost>
>> 
>> Anyhow, this is being fixed... TC should have no
>> clue of what is a virtual
>> host, it just needs to know that a request is mapped
>> to a particular
>> context, no need to care about anything else...
>> 
>>     Pier
>> 
>> --
>> [Perl] combines all the worst aspects of C and Lisp:
>>  a billion of different
>> sublanguages in  one monolithic executable.  It
>> combines the power of C with
>> the readability of PostScript. [Jamie Zawinski - DNA
>> Lounge - San Francisco]
>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fix for bug #8331??

Posted by Sam Ewing <ja...@yahoo.com>.
Hi Pier,

Did just that. Apachectl configtest gives a 'Syntax
OK'; however when I start apache, 'apachectl start'
fails with the following error:

"
(13)Permission denied: make_sock: could not bind to
address 0.0.0.0:80
no listening sockets available, shutting down
"

>From your config directives, I assumes that you are
Apache 1.3 ('libexec' instead of 'modules'). I tried
to move to Apache 1.3;  but I get the following
errors:
"
Syntax error on line 206 of
/home/sam/http/conf/httpd.conf:
Cannot load /home/sam/http/libexec/mod_webapp.so into
server: /home/sam/http/libexec/mod_webapp.so:
undefined symbol: apr_atomic_set
./apachectl start: httpd could not be started
"

Help!!
 
--- Pier Fumagalli <pi...@betaversion.org> wrote:
> Sam Ewing <ja...@yahoo.com> wrote:
> 
> > I am on Apache 2.0.39 and Tomcat 4.1.3, and the
> latest
> > webapp connector code, fresh from CVS.
> > 
> > I am facing a "Invalid virtual host name" error
> from
> > Apache with this configuration:
> > 
> >  LoadModule webapp_module libexec/mod_webapp.so
> >  WebAppConnection conn     warp localhost:8008
> >  WebAppDeploy     examples conn /examples
> > 
> > This seems to be identical to bug#8331. Any fixes?
> > 
> >
>
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8331
> 
> I runs on my own system here... Did you remember to
> put the "ServerName"
> directive in your virtual host? This is how my
> httpd.conf (relevant part of
> virtualhosts looks like):
> 
> [...]
> LoadModule webapp_module libexec/mod_webapp.so
> [...]
> ServerName blossom.betaversion.org:80
> [...]
> WebAppConnection local warp 127.0.0.1:8008
> [...]
> NameVirtualHost *
> 
> <VirtualHost *>
>     ServerName blossom.betaversion.org:80
>     # DocumentRoot [inherited from main]
>     # ServerAdmin [inherited from main]
> 
>     WebAppInfo /webapp-status
>     [...]
> </VirtualHost>
> 
> <VirtualHost *>
>     ServerName www1.blossom:80
>     DocumentRoot
> /Library/Services/Apache2/Sites/www1
>     # ServerAdmin [inherited from main]
> 
>     WebAppDeploy     svnview local /svnview
>     [...]
> </VirtualHost>
> 
> Anyhow, this is being fixed... TC should have no
> clue of what is a virtual
> host, it just needs to know that a request is mapped
> to a particular
> context, no need to care about anything else...
> 
>     Pier
> 
> --
> [Perl] combines all the worst aspects of C and Lisp:
>  a billion of different
> sublanguages in  one monolithic executable.  It
> combines the power of C with
> the readability of PostScript. [Jamie Zawinski - DNA
> Lounge - San Francisco]
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Fix for bug #8331??

Posted by Pier Fumagalli <pi...@betaversion.org>.
Sam Ewing <ja...@yahoo.com> wrote:

> I am on Apache 2.0.39 and Tomcat 4.1.3, and the latest
> webapp connector code, fresh from CVS.
> 
> I am facing a "Invalid virtual host name" error from
> Apache with this configuration:
> 
>  LoadModule webapp_module libexec/mod_webapp.so
>  WebAppConnection conn     warp localhost:8008
>  WebAppDeploy     examples conn /examples
> 
> This seems to be identical to bug#8331. Any fixes?
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8331

I runs on my own system here... Did you remember to put the "ServerName"
directive in your virtual host? This is how my httpd.conf (relevant part of
virtualhosts looks like):

[...]
LoadModule webapp_module libexec/mod_webapp.so
[...]
ServerName blossom.betaversion.org:80
[...]
WebAppConnection local warp 127.0.0.1:8008
[...]
NameVirtualHost *

<VirtualHost *>
    ServerName blossom.betaversion.org:80
    # DocumentRoot [inherited from main]
    # ServerAdmin [inherited from main]

    WebAppInfo /webapp-status
    [...]
</VirtualHost>

<VirtualHost *>
    ServerName www1.blossom:80
    DocumentRoot /Library/Services/Apache2/Sites/www1
    # ServerAdmin [inherited from main]

    WebAppDeploy     svnview local /svnview
    [...]
</VirtualHost>

Anyhow, this is being fixed... TC should have no clue of what is a virtual
host, it just needs to know that a request is mapped to a particular
context, no need to care about anything else...

    Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Fix for bug #8331??

Posted by Sam Ewing <ja...@yahoo.com>.
I am on Apache 2.0.39 and Tomcat 4.1.3, and the latest
webapp connector code, fresh from CVS. 

I am facing a "Invalid virtual host name" error from
Apache with this configuration:

   LoadModule webapp_module libexec/mod_webapp.so
   WebAppConnection conn     warp localhost:8008
   WebAppDeploy     examples conn /examples


This seems to be identical to bug#8331. Any fixes?

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8331

Tx

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Separating Tomcat and Apache configuration

Posted by Pier Fumagalli <pi...@betaversion.org>.
Milt Epstein <me...@uiuc.edu> wrote:

> 2. If the connector directives could be specified in .htaccess files,
>  this would give us the control we need.  But apparently this is not
>  possible.  It's my understanding that when a directive is created,
>  it is specified what context it can be used in, where server,
>  virtualhost, and htaccess are some of the possible contexts.  Is
>  there some special reason mod_jk and mod_webapp directives are not
>  allowed in htaccess context?  What would it take to add this?  Is
>  this something the tomcat developers would consider doing.

Milt. FWIW, directives into a .htaccess file are scoped as if they were into
a <Directory ...> tag...

And directories don't have much meaning when thinking about webapp...

It would be as specifying "ScriptAlias" in a directory, which doesn't make
much sense (scriptalias aliases an URL prefix with a directory, and enables
the +ExecCGI option).

The question would be, how would I be able to figure out your web
application deployment path from the .htaccess? I only have your local
directory on the drive...

Give some examples...

    Pier

--
[Perl] combines all the worst aspects of C and Lisp:  a billion of different
sublanguages in  one monolithic executable.  It combines the power of C with
the readability of PostScript. [Jamie Zawinski - DNA Lounge - San Francisco]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Separating Tomcat and Apache configuration

Posted by Milt Epstein <me...@uiuc.edu>.
We're trying to come up with a way to use Tomcat integrated with
Apache in our production enviroment.  In this environment, we have
"service" managers and "system" managers.  There may be multiple
services (and hence multiple service managers) per machine.  And
there'd be one Tomcat instance per service.  The management of Tomcat
would be the responsibility of the service managers, while the
management of Apache would be the responsibility of the system
manager.

The ideal case would be if these duties could be totally separated.
But we've been having problems coming up with an arrangement that
allows this.  The problem is that the connector directives (whether it
be mod_jk or mod_webapp) that tell Apache what URLs to forward to a
particular Tomcat instance must be in Apaches httpd.conf file (which
is under control of the system manager, recall).  This is a problem
when the service manager wants to deploy new web applications.

Some comments:

1. We could have httpd.conf "include" a file under each service
   manager's control.  But this is undesirable.

2. If the connector directives could be specified in .htaccess files,
   this would give us the control we need.  But apparently this is not
   possible.  It's my understanding that when a directive is created,
   it is specified what context it can be used in, where server,
   virtualhost, and htaccess are some of the possible contexts.  Is
   there some special reason mod_jk and mod_webapp directives are not
   allowed in htaccess context?  What would it take to add this?  Is
   this something the tomcat developers would consider doing.

3. What exactly is the JkAutoMount directive, and is it implemented in
   any connector?  I saw this, and it looked it could be used to have
   the web server (Apache) query the servlet container (Tomcat) was to
   what URL's/contexts there were.  But details were sketchy.  But if
   this mechanism did exist, we might be able to use to do what we
   want.

4. I don't know exactly how the Tomcat manager application handles
   installing/starting webapps, but if it works when Tomcat is
   integrated with Apache, this too might allow us to do what want.
   However, I've recently gathered that this mechanism only works with
   Tomcat standalone, so it probably won't help us.

Any info that might helps us get closer to what we're trying to do
would surely be appreciated.  That might be elaboration/clarification
of some of the ideas mentioned above, or some other ideas I didn't
mention.

Thanks!

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>