You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Josh Gooding <jo...@gmail.com> on 2009/08/08 06:35:17 UTC

[users@httpd] slight problem with Tomcat and Httpd working together.

Interesting situation I have going on here....

When running Tomcat 6.0.18 as the webserver I have 2 hosts configured one as
the .com and it is serving from the webapps folder just fine, the other is
serving to a subdomain perfectly.  I couldn't be happier in how it is
running.

Here is where it get's tricky.  Since Tomcat is not the most efficient at
serving static HTML pages I decided to install httpd v 2.2.11 (w/ SSL) and
get it working this evening on my dedicated server.  I have Tomcat and Httpd
talking to each other because when I goto the main .com, I get the under
construction page that is hosted in htdocs/, when I goto (for example)
abcapps in tomcat, it forwards correctly and everything is fine.  All my
tomcat configuration gets forwarded correctly (time to convert the horrible
code to taglibs!!), When I go to my subdomain (http://subd.domain.com) I get
the default under construction page (now hosted in the htdocs folder moved
from $CATALINA_HOME/ROOT).

Somewhere along the way did something get crossed and I am not sure what it
is, which is why I posted this to both user groups, so sorry if it annoys
some of you out there.

I'm rather quick to rule out my server.xml configuration due to it working
perfectly under tomcat alone.

Here's the snippet of my httpd.conf file that should matter :

LoadModule jk_module "C:\Program Files (x86)\Apache Software
Foundation\Apache2.2\modules\mod_jk.so"
JkWorkersFile "C:\Program
Files\apache-tomcat-6.0.18\conf\workers.properties"
JkLogFile "C:\Program Files\apache-tomcat-6.0.18\logs\from_httpd_mod_jk.log"
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

#Send servlet for context /examples to worker named ajp13

JkMount /* ajp13

#Send JSP's for context /examples/* to worker named ajp13

JkMount /*/* ajp13

Since I have virtual hosting on tomcat serving to a subdomain, do I have to
do anything with virtual hosting on httpd to forward subdomain to httpd?
Any insight would be very much appreciated.  If you need more information,
please let me know and I'll provide.

Warmest regards,

Josh

Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
NVM chuck, I believe it's in the native docs.  I looked at the link right
after you posted.  I couldn't find the native link on apaches site.

T/Y sir


On Tue, Aug 11, 2009 at 10:46 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Josh Gooding [mailto:josh.gooding@gmail.com]
> > Subject: Re: slight problem with Tomcat and Httpd working together.
> >
> > I downloaded the APR for Tomcat.  Dumb question, is there already a
> > binary distribution someplace?
>
> For Windows, yes; it's in the docs:
> http://tomcat.apache.org/native-doc/
>
> The 32- and 64-bit DLLs are here:
> http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.16/binaries/
>
>  - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: slight problem with Tomcat and Httpd working together.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Josh Gooding [mailto:josh.gooding@gmail.com]
> Subject: Re: slight problem with Tomcat and Httpd working together.
> 
> I downloaded the APR for Tomcat.  Dumb question, is there already a
> binary distribution someplace?

For Windows, yes; it's in the docs:
http://tomcat.apache.org/native-doc/

The 32- and 64-bit DLLs are here:
http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.16/binaries/

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
You know Chuck, it would probably work if I put Auto-deploy to "true"
instead of false.  (tried and it works).

On Wed, Aug 26, 2009 at 10:32 AM, Josh Gooding <jo...@gmail.com>wrote:

> Wait a sec.  The only <Context> element I have defined in my server.xml
> file is here:
>
>     <Engine name="Catalina" defaultHost="localhost">
>             <Host name="localhost"  appBase="d:/webapps/"
>                     unpackWARs="true" autoDeploy="false"
>                     xmlValidation="false" xmlNamespaceAware="false" >
>
>                 <Context docBase="ROOT" path="" />
>             </Host>
>
> So I understand why they are not being ignored.  I still figure that I
> should be able to deploy a new project on the fly though and not have to
> restart tomcat.
>
>
> On Wed, Aug 26, 2009 at 10:29 AM, Josh Gooding <jo...@gmail.com>wrote:
>
>> Chuck,
>>
>> On this:
>>
>> > each of those has their own context.xml defined in the META-INF
>> > directory of the project.
>>
>> > And those will be ignored, since you have them in server.xml.
>>
>> Something that I am not understanding.  If the context.xml files are truly
>> ignored how can each of the companies be able to login?
>> Each company has their own DB/DB user/ and password defined in the
>> <Resource> tag.  I think I either did something REALLY weird on my tomcat or
>> otherwise.
>>
>> You're saying if I create the conf/Catalina/[host]/[appName].xml I can add
>> them on the fly?
>>
>> Next Q.
>>
>> would it be something like conf/Catalina/localhost/xyzcompany.xml?  Isn't
>> this for JAAS type realm? Means I have to switch my JDBC realm type to JAAS
>> which I know nothing about. Could be a good time to learn it, but I'd rather
>> keep the JDBC realm authentication if possible.
>>
>> I just changed the files (without changing the realm type) and it looks
>> like nothing is going to work / authenticate.  I am getting JAAS errors
>>
>> :Aug 26, 2009 10:07:46 AM org.apache.catalina.realm.JAASRealm authenticate
>> SEVERE: Unexpected error
>> java.lang.SecurityException: Unable to locate a login configuration
>>         at
>> com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93):
>>
>> Let me ask this
>>
>> I know best practice is keeping the webapps directory inside of
>> $CATALINA_HOME.  In my situation, that's just not possible.  I have a JDBC
>> realm configured for authentication (not JAAS).  I have my webapps stored on
>> a physically separate drive for backup and restore reasons.  What would I
>> have to change in my configuration to be able to serve new projects under
>> the new displaced webapps folder, keeping my JDBC realm configuration, and
>> without having to restart tomcat each time I add one.  Is it possible?
>>
>> It seems as though when I used the webapps folder in $CATALINA_HOME I
>> could add and remove folders in the webapps folder and I didn't have to
>> restart tomcat each time.
>> - J
>>
>>
>> On Thu, Aug 13, 2009 at 5:33 PM, Caldarale, Charles R <
>> Chuck.Caldarale@unisys.com> wrote:
>>
>>> > From: Josh Gooding [mailto:josh.gooding@gmail.com]
>>> > Subject: Re: slight problem with Tomcat and Httpd working together.
>>> >
>>> > *Wait a sec, illegal as in (will throw an exception) or just bad
>>> > practice?
>>>
>>> Illegal in that predictable behavior cannot be guaranteed.  Tomcat is
>>> pretty good about ignoring invalid attributes, but it's not perfect in that
>>> regard, and problems may result.
>>>
>>> > I have a <context> defined in my server.xml's <host> for the
>>> > deployments being hosted outside of $CATALINA_HOME/webapps
>>> > directory
>>>
>>> That isn't illegal, but is extremely bad practice, since you can't modify
>>> them without restarting Tomcat.  By placing the <Context> elements in
>>> conf/Catalina/[host]/[appName].xml, you can modify them as needed while
>>> Tomcat is running.
>>>
>>> > each of those has their own context.xml defined in the META-INF
>>> > directory of the project.
>>>
>>> And those will be ignored, since you have them in server.xml.
>>>
>>> > Are you saying that, that is wrong?
>>>
>>> Yup.
>>>
>>>  - Chuck
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>
>

Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
Wait a sec.  The only <Context> element I have defined in my server.xml file
is here:

    <Engine name="Catalina" defaultHost="localhost">
            <Host name="localhost"  appBase="d:/webapps/"
                    unpackWARs="true" autoDeploy="false"
                    xmlValidation="false" xmlNamespaceAware="false" >

                <Context docBase="ROOT" path="" />
            </Host>

So I understand why they are not being ignored.  I still figure that I
should be able to deploy a new project on the fly though and not have to
restart tomcat.

On Wed, Aug 26, 2009 at 10:29 AM, Josh Gooding <jo...@gmail.com>wrote:

> Chuck,
>
> On this:
>
> > each of those has their own context.xml defined in the META-INF
> > directory of the project.
>
> > And those will be ignored, since you have them in server.xml.
>
> Something that I am not understanding.  If the context.xml files are truly
> ignored how can each of the companies be able to login?
> Each company has their own DB/DB user/ and password defined in the
> <Resource> tag.  I think I either did something REALLY weird on my tomcat or
> otherwise.
>
> You're saying if I create the conf/Catalina/[host]/[appName].xml I can add
> them on the fly?
>
> Next Q.
>
> would it be something like conf/Catalina/localhost/xyzcompany.xml?  Isn't
> this for JAAS type realm? Means I have to switch my JDBC realm type to JAAS
> which I know nothing about. Could be a good time to learn it, but I'd rather
> keep the JDBC realm authentication if possible.
>
> I just changed the files (without changing the realm type) and it looks
> like nothing is going to work / authenticate.  I am getting JAAS errors
>
> :Aug 26, 2009 10:07:46 AM org.apache.catalina.realm.JAASRealm authenticate
> SEVERE: Unexpected error
> java.lang.SecurityException: Unable to locate a login configuration
>         at
> com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93):
>
> Let me ask this
>
> I know best practice is keeping the webapps directory inside of
> $CATALINA_HOME.  In my situation, that's just not possible.  I have a JDBC
> realm configured for authentication (not JAAS).  I have my webapps stored on
> a physically separate drive for backup and restore reasons.  What would I
> have to change in my configuration to be able to serve new projects under
> the new displaced webapps folder, keeping my JDBC realm configuration, and
> without having to restart tomcat each time I add one.  Is it possible?
>
> It seems as though when I used the webapps folder in $CATALINA_HOME I could
> add and remove folders in the webapps folder and I didn't have to restart
> tomcat each time.
> - J
>
>
> On Thu, Aug 13, 2009 at 5:33 PM, Caldarale, Charles R <
> Chuck.Caldarale@unisys.com> wrote:
>
>> > From: Josh Gooding [mailto:josh.gooding@gmail.com]
>> > Subject: Re: slight problem with Tomcat and Httpd working together.
>> >
>> > *Wait a sec, illegal as in (will throw an exception) or just bad
>> > practice?
>>
>> Illegal in that predictable behavior cannot be guaranteed.  Tomcat is
>> pretty good about ignoring invalid attributes, but it's not perfect in that
>> regard, and problems may result.
>>
>> > I have a <context> defined in my server.xml's <host> for the
>> > deployments being hosted outside of $CATALINA_HOME/webapps
>> > directory
>>
>> That isn't illegal, but is extremely bad practice, since you can't modify
>> them without restarting Tomcat.  By placing the <Context> elements in
>> conf/Catalina/[host]/[appName].xml, you can modify them as needed while
>> Tomcat is running.
>>
>> > each of those has their own context.xml defined in the META-INF
>> > directory of the project.
>>
>> And those will be ignored, since you have them in server.xml.
>>
>> > Are you saying that, that is wrong?
>>
>> Yup.
>>
>>  - Chuck
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>

RE: slight problem with Tomcat and Httpd working together.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Josh Gooding [mailto:josh.gooding@gmail.com]
> Subject: Re: slight problem with Tomcat and Httpd working together.
> 
> Something that I am not understanding.  If the context.xml files are
> truly ignored how can each of the companies be able to login?

You appear to have answered your own question, since you don't really have the <Context> elements in server.xml.

> You're saying if I create the conf/Catalina/[host]/[appName].xml
> I can add them on the fly?

You can always add webapps on the fly, if you have autoDeploy set.

> would it be something like conf/Catalina/localhost/xyzcompany.xml?
> Isn't this for JAAS type realm?

The location of the <Context> element has nothing to do with whatever <Realm> is being used.

> I know best practice is keeping the webapps directory inside of
> $CATALINA_HOME.

That's not best practice, just the default one.

> What would I have to change in my configuration to be able to 
> serve new projects under the new displaced webapps folder

Just the appBase attribute of the <Host> element; point it to the location of your webapps.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
Chuck,

On this:

> each of those has their own context.xml defined in the META-INF
> directory of the project.

> And those will be ignored, since you have them in server.xml.

Something that I am not understanding.  If the context.xml files are truly
ignored how can each of the companies be able to login?
Each company has their own DB/DB user/ and password defined in the
<Resource> tag.  I think I either did something REALLY weird on my tomcat or
otherwise.

You're saying if I create the conf/Catalina/[host]/[appName].xml I can add
them on the fly?

Next Q.

would it be something like conf/Catalina/localhost/xyzcompany.xml?  Isn't
this for JAAS type realm? Means I have to switch my JDBC realm type to JAAS
which I know nothing about. Could be a good time to learn it, but I'd rather
keep the JDBC realm authentication if possible.

I just changed the files (without changing the realm type) and it looks like
nothing is going to work / authenticate.  I am getting JAAS errors

:Aug 26, 2009 10:07:46 AM org.apache.catalina.realm.JAASRealm authenticate
SEVERE: Unexpected error
java.lang.SecurityException: Unable to locate a login configuration
        at
com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:93):

Let me ask this

I know best practice is keeping the webapps directory inside of
$CATALINA_HOME.  In my situation, that's just not possible.  I have a JDBC
realm configured for authentication (not JAAS).  I have my webapps stored on
a physically separate drive for backup and restore reasons.  What would I
have to change in my configuration to be able to serve new projects under
the new displaced webapps folder, keeping my JDBC realm configuration, and
without having to restart tomcat each time I add one.  Is it possible?

It seems as though when I used the webapps folder in $CATALINA_HOME I could
add and remove folders in the webapps folder and I didn't have to restart
tomcat each time.
- J


On Thu, Aug 13, 2009 at 5:33 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Josh Gooding [mailto:josh.gooding@gmail.com]
> > Subject: Re: slight problem with Tomcat and Httpd working together.
> >
> > *Wait a sec, illegal as in (will throw an exception) or just bad
> > practice?
>
> Illegal in that predictable behavior cannot be guaranteed.  Tomcat is
> pretty good about ignoring invalid attributes, but it's not perfect in that
> regard, and problems may result.
>
> > I have a <context> defined in my server.xml's <host> for the
> > deployments being hosted outside of $CATALINA_HOME/webapps
> > directory
>
> That isn't illegal, but is extremely bad practice, since you can't modify
> them without restarting Tomcat.  By placing the <Context> elements in
> conf/Catalina/[host]/[appName].xml, you can modify them as needed while
> Tomcat is running.
>
> > each of those has their own context.xml defined in the META-INF
> > directory of the project.
>
> And those will be ignored, since you have them in server.xml.
>
> > Are you saying that, that is wrong?
>
> Yup.
>
>  - Chuck
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: slight problem with Tomcat and Httpd working together.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Josh Gooding [mailto:josh.gooding@gmail.com]
> Subject: Re: slight problem with Tomcat and Httpd working together.
>
> *Wait a sec, illegal as in (will throw an exception) or just bad
> practice?

Illegal in that predictable behavior cannot be guaranteed.  Tomcat is pretty good about ignoring invalid attributes, but it's not perfect in that regard, and problems may result.

> I have a <context> defined in my server.xml's <host> for the 
> deployments being hosted outside of $CATALINA_HOME/webapps 
> directory

That isn't illegal, but is extremely bad practice, since you can't modify them without restarting Tomcat.  By placing the <Context> elements in conf/Catalina/[host]/[appName].xml, you can modify them as needed while Tomcat is running.

> each of those has their own context.xml defined in the META-INF 
> directory of the project.

And those will be ignored, since you have them in server.xml.

> Are you saying that, that is wrong?

Yup.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
> I understand what the appBase is
>
> Perhaps you don't; the appBase attribute of a <Host> is the /default/
> deployment directory for its webapps; individual webapps are typically
> located *under* the appBase directory.
>
> > I don't understand why the docBase and appBase cannot be the
> > same declaration
>
> Because they are quite different; appBase points to the directory under
> which a *collection* of webapps resides, docBase points to an *individual*
> webapp.


*I kind of figured that one, that the appBase is where the collection of
deployable packages resides.*

> why it is recommended that anything in your appBase shouldn't
> start with the same string that is defined in your docBase.

I haven't read the O'Reilly book so I don't know if it contains confusing or
> irrelevant information.  The real point here is that you can easily get
> double deployments if you start putting in values for docBase; it's normally
> not used these days.


*This isn't in the O'Reilly book, I found this in multiple places on the
net, it was coupled with the double deployment information.*

>
> > I have my docBase set to ROOT on the data drive
> > and the appBase is just defined as <drive>:/webapps/
>
> You seem not to be aware that one can have many webapps running under one
> instance of Tomcat; ROOT is simply the default one.  Note that if your
> <Context> element is in your webapp's META-INF/context.xml file, it is
> illegal to set the docBase (or path) attributes.  The docBase attribute
> should only be used when the webapp is located *outside* of the <Host>
> appBase directory, and the <Context> element is in
> conf/Catalina/[host]/[appName].xml.


*Wait a sec, illegal as in (will throw an exception) or just bad practice? I
understand the idea of each <Host> can have it's own different appBase
declaration.  This cleared up the issue of "when" the docBase attribute
should be set, but my conf/Catalina/[host]/[appName.xml] doesn't exist.  I
have a <context> defined in my server.xml's <host> for the deployments being
hosted outside of $CATALINA_HOME/webapps directory, and each of those has
their own context.xml defined in the META-INF directory of the project.  Are
you saying that, that is wrong?  I'll post the xml configurations if you
want to look at it, but if it is wrong, it's working like expected.
*

>
> > there is really no clear concise "This is what the docBase is,
> > does, and means" that I can find.
>
> To quote from the Tomcat doc:
>
> "The Document Base (also known as the Context Root) directory for this web
> application, or the pathname to the web application archive file (if this
> web application is being executed directly from the WAR file). You may
> specify an absolute pathname for this directory or WAR file, or a pathname
> that is relative to the appBase directory of the owning Host.
>

*I'm sorry if I am being thick.... this is very cryptic to me.*

>
>
> "The value of this field must not be set when the Context is configured
> using a META-INF/context.xml file as it will be inferred by the automatic
> deployment process."
>
>  - Chuck
>

*As usual Chuck, thanks for taking the time and trying to explain things for
me.  From what I am seeing tomcat isn't that bad, it just can be a little
more than tricky to configure, and you can get some really interesting
errors when things aren't configured properly.

- Josh
*

RE: slight problem with Tomcat and Httpd working together.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Josh Gooding [mailto:josh.gooding@gmail.com]
> Subject: Re: slight problem with Tomcat and Httpd working together.
> 
> be SURE you get the correct version of the binaries for your version of
> Tomcat (32-bit / 64 bit).

Tomcat itself is pure Java, so it is neither 32- nor 64-bit sensitive.  The JVM you run Tomcat on *is* 32- or 64-bit specific, however.

> I am having some trouble understanding what the docBase is.

The docBase attribute of <Context> is the deployment location of an individual webapp.

> I understand what the appBase is

Perhaps you don't; the appBase attribute of a <Host> is the /default/ deployment directory for its webapps; individual webapps are typically located *under* the appBase directory.

> I don't understand why the docBase and appBase cannot be the
> same declaration

Because they are quite different; appBase points to the directory under which a *collection* of webapps resides, docBase points to an *individual* webapp.


> why it is recommended that anything in your appBase shouldn't
> start with the same string that is defined in your docBase.

I haven't read the O'Reilly book so I don't know if it contains confusing or irrelevant information.  The real point here is that you can easily get double deployments if you start putting in values for docBase; it's normally not used these days.

> I have my docBase set to ROOT on the data drive
> and the appBase is just defined as <drive>:/webapps/

You seem not to be aware that one can have many webapps running under one instance of Tomcat; ROOT is simply the default one.  Note that if your <Context> element is in your webapp's META-INF/context.xml file, it is illegal to set the docBase (or path) attributes.  The docBase attribute should only be used when the webapp is located *outside* of the <Host> appBase directory, and the <Context> element is in conf/Catalina/[host]/[appName].xml.

> there is really no clear concise "This is what the docBase is,
> does, and means" that I can find.

To quote from the Tomcat doc:

"The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host.

"The value of this field must not be set when the Context is configured using a META-INF/context.xml file as it will be inferred by the automatic deployment process."

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
Excellent, and just for the record, for those who read this on the archives,
be SURE you get the correct version of the binaries for your version of
Tomcat (32-bit / 64 bit).  Tomcat is running on a dual core opteron (64-bit
production server) and has been modified to run with the 64 bit tomcat6.exe
and tomcat6w.exe, however it will not recognize the 32-bit library as I
expected.

Everything is running very smoothly now.  I modded the <Host> to move the
sites onto the data drive.  So instead of installing and uploading files to
the 20GB partition, they all upload to the 500GB partition.  Now the only
thing I have to do is grab the Geo-trust cert and configure to use.

I thank you so much for all the help you've given me so far.

I do have one more question however.  I've been reading this O'Reilly book
and the docs @ tomcat and I am having some trouble understanding what the
docBase is.  I understand what the appBase is but I don't understand why the
docBase and appBase cannot be the same declaration or why it is recommended
that anything in your appBase shouldn't start with the same string that is
defined in your docBase.  I have my docBase set to ROOT on the data drive
and the appBase is just defined as <drive>:/webapps/  It seems to work, just
a little confusing not knowing why I am configuring the docBase when there
is really no clear concise "This is what the docBase is, does, and means"
that I can find.

Can you point me to a good resource for reading up on what the docBase is?

On Tue, Aug 11, 2009 at 11:28 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Josh Gooding [mailto:josh.gooding@gmail.com]
> > Subject: Re: slight problem with Tomcat and Httpd working together.
> >
> > HEY!!! It's in there and working.
>
> Congratulations.
>
> > INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
>
> That version is out of date; the current one  is here:
> http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.16/binaries/
>
> > Now if I have an SSL cert from Geo-trust / Verisign / whatever, do I
> > still have to install OpenSSL?
>
> No, it's built into tcnative-1.dll, so you've already got it.
>
>  - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: slight problem with Tomcat and Httpd working together.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Josh Gooding [mailto:josh.gooding@gmail.com]
> Subject: Re: slight problem with Tomcat and Httpd working together.
> 
> HEY!!! It's in there and working.

Congratulations.

> INFO: Loaded APR based Apache Tomcat Native library 1.1.14.

That version is out of date; the current one  is here:
http://www.apache.org/dist/tomcat/tomcat-connectors/native/1.1.16/binaries/

> Now if I have an SSL cert from Geo-trust / Verisign / whatever, do I
> still have to install OpenSSL?

No, it's built into tcnative-1.dll, so you've already got it.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
HEY!!! It's in there and working.

Aug 11, 2009 10:58:47 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.14.
Aug 11, 2009 10:58:47 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters
[false], random [true].

Now if I have an SSL cert from Geo-trust / Verisign / whatever, do I still
have to install OpenSSL?  It's currently residing in the path, I'm just
going to read up in the docs and see what the next steps to do are.

Thank you guys So much.  I really appreciate all of your help.

On Tue, Aug 11, 2009 at 10:51 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Josh Gooding [mailto:josh.gooding@gmail.com]
> > Subject: Re: slight problem with Tomcat and Httpd working together.
> >
> > Where do I put the DLL that I want to use?
>
> In Tomcat's bin directory.
>
>  - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: slight problem with Tomcat and Httpd working together.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Josh Gooding [mailto:josh.gooding@gmail.com]
> Subject: Re: slight problem with Tomcat and Httpd working together.
> 
> Where do I put the DLL that I want to use? 

In Tomcat's bin directory.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
Even better, I got what I was looking for.  Where do I put the DLL that I
want to use?  in wondows or in what tomcat directory?

On Tue, Aug 11, 2009 at 10:27 AM, Josh Gooding <jo...@gmail.com>wrote:

> Chris,
>
> My thanks to you and Chuck for clarifying that.  The reason that I set up
> httpd on the machine is for PHP and other possible languages.  I was trying
> to be a little more future thinking, however, since PHP is no longer an
> option for these guys, I'll just nix the httpd server and move back into a
> solid tomcat install.
>
> Moving onto the APR questions I have and SSL.  Let me ask this.  Does
> anyone have / use gmail?  If so, next time you log in, watch what happens.
> You log in via SSL, yet when you view everything else your in standard HTML.
>
> I downloaded the APR for Tomcat.  Dumb question, is there already a binary
> distribution someplace?  If not, what do I use to compile them?  I read
> something about a Win32 Developer Studio?  It looks like I might need Visual
> Studio, which I can do, but is there a way to do this in Eclipse?
>
> P.S.  I ditched Apache 2.2 for now.  I just moved my old server.xml into
> the conf directory and stopped the httpd service.
>
>

Re: slight problem with Tomcat and Httpd working together.

Posted by Josh Gooding <jo...@gmail.com>.
Chris,

My thanks to you and Chuck for clarifying that.  The reason that I set up
httpd on the machine is for PHP and other possible languages.  I was trying
to be a little more future thinking, however, since PHP is no longer an
option for these guys, I'll just nix the httpd server and move back into a
solid tomcat install.

Moving onto the APR questions I have and SSL.  Let me ask this.  Does anyone
have / use gmail?  If so, next time you log in, watch what happens.  You log
in via SSL, yet when you view everything else your in standard HTML.

I downloaded the APR for Tomcat.  Dumb question, is there already a binary
distribution someplace?  If not, what do I use to compile them?  I read
something about a Win32 Developer Studio?  It looks like I might need Visual
Studio, which I can do, but is there a way to do this in Eclipse?

P.S.  I ditched Apache 2.2 for now.  I just moved my old server.xml into the
conf directory and stopped the httpd service.

Re: slight problem with Tomcat and Httpd working together.

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Josh,

On 8/8/2009 12:35 AM, Josh Gooding wrote:
> Since Tomcat is not the most efficient at
> serving static HTML pages

As Chuck suggests, this is an incorrect assumption. In recent testing I
performed myself, Tomcat 6.0.20's APR connector (also mentioned by
Chuck) with sendfile enabled performed on par with Apache httpd. For
high-concurrency environments, Tomcat's NIO connector is a good bet as
well (though it doesn't perform quite as well as the APR connector, it
can be configured to use fewer resources than APR).

I did not perform any testing involving Tomcat's SSL versus Apache
httpd, but I suspect they will again be the same.

Why? Because the APR connector uses the same code as Apache httpd to do
both SSL and static file delivery.

So, you can argue all you want, but the performance will still be the
same. Stick with a configuration that is simpler since httpd is not
required for your setup.

> #Send servlet for context /examples to worker named ajp13
> 
> JkMount /* ajp13

This comment and mount directive do not agree. If you want your mount
directive to match your comment, you want:

JkMount /examples/* ajp13

> #Send JSP's for context /examples/* to worker named ajp13
> 
> JkMount /*/* ajp13

Again, this comment and mount directive do not agree. Technically
speaking, the mount directive above (either version: yours or mine) will
both cover this URL pattern already, so there's no advantage to putting
them both in your configuration (note that * matches / characters).

> Since I have virtual hosting on tomcat serving to a subdomain, do I have to
> do anything with virtual hosting on httpd to forward subdomain to httpd?

Do you have different VirtualHost sections in your httpd.conf file? If
so, you'll need to repeat the JkMounts in each one. There's more
relevant httpd configuration than what you posted :)

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

iEYEARECAAYFAkqAWm8ACgkQ9CaO5/Lv0PDyJgCeJjcODxL0P+OAW8ZEbdUPvVvG
CUwAn3lPJ1+xSDOYUwqeWFdGpVpU/9+A
=MUMC
-----END PGP SIGNATURE-----

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


RE: slight problem with Tomcat and Httpd working together.

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Josh Gooding [mailto:josh.gooding@gmail.com]
> Subject: slight problem with Tomcat and Httpd working together.

Please don't cross-post.

> Since Tomcat is not the most efficient at serving static HTML pages

A misconception left over from the dark ages.

> I decided to install httpd v 2.2.11 (w/ SSL)

It would be much simpler and more efficient to use Tomcat's APR connector, which includes OpenSSL, and not bother with httpd.

http://tomcat.apache.org/tomcat-6.0-doc/apr.html

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org