Re: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread Christopher Schultz
Antonio,

In fact, cap it at 10 and watch the app dring to a halt before it even 
gets going. This is a pretty compelling example. If the pool is drying 
up, they're definately screwing up.
It is. But developers may reply: You are using less connections than 
those specified in (the contract) / (the manual) / (fill in yourself).
I thinks we're misunderstanding each other. I think that when the pool 
is capped, and the connections are never returned, you get to a point 
where the pool refuses to give you a new connection, no matter how long 
you wait.

This is a pretty good idea for some basic debugging. You should only 
have to demonstrate to your devs that you can deadlock their server by 
capping the connection pool. After that, it's their problem, right? :)
With the proposal, you demonstrate they have a connection leak, which is 
the real problem.

Once you showed them they had ONE connection leak, you can urge them to 
dig for other connection leaks themselves.

But, of course, the idea about the deadlock seems really good also. If I 
understood, what you mean is: If you set the connection pool size too 
low for the app, it should crash at will (or better, show an 
'unavailable' screen), but it should continue working as soon as load 
permits it. Am I wrong?
I'm thinking that the connections are added to the pool upon request 
(from his observationa, it looks like the 10 pre-allocated connections 
are always ignored), and then never returned. The pool remembers the 
pre-allocated ones, plus the ones it created on-the-fly. I think that if 
he caps the connection pool size at 25, it will only take 20 requests to 
lock up the server for want of a DB connection.

Try setting the pool size to 11 and see if you lock up after one request ;)

-chris


signature.asc
Description: OpenPGP digital signature


RE: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread Kannan Sundararajan
Sysadmins are sysadmins AND developers are developers. No one cannot cross
the borderline or even compare. 

They are clowns.
I wouldn't call the developers or professionals like this. 

I can agree partially to yours. But if you see him, he doesn't know about
the impact of JVM and tuning parameters, as he mentioned in his email. Do
you expect him to take a lead in fixing that? I have seen the projects
losing its focus by the nature of peoples deviating to get their interests
fulfilled. 

I would appreciate, if the developer and sysadmin working together in this
problem (i doubt verymuch as sysadmin involvment, all he can do is give
top or sar reports). Sysadmin has much knowledge in configuring servers,
architect the infrastructure, manage the network, backups etc. 

I never seen any sysadmin trying to fine tune any Application Servers. If
that is the case, then the project sucess will be in stake. Everyone has to
do their own roles. If I would be the sysadmin, then i would tell the
developers to go these newsgroups. Dont you think that most of developers
resolve their issues by newsgroups and websites for their problems. 

This isn't about communication or a sysadmin whining to the devs about
something he doesn't understand. 
He clearly mentioned that the developeers raised that questions and trying
to get the verification from the newsgroups. Dont you think that is the part
of communication gap between the developers and him. If he is very keen, why
not one of the developers responding his thread and get the issues fixed for
the project. 

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Monday, March 01, 2004 9:49 PM
To: Tomcat Users List
Subject: Re: Virtual Hosts with Apache and Tomcat


Kannan,

 Being yourself as SYSADMIN for UNIX and Network, it would be nice that
 developers or professional should take a lead into get into this problem.

Easy for you to say.

Let's face it: these guys have a connection leak. Plain and simple. Your 
devs need to find their leak. It is demonstrable. It locks up the 
server. QED. Make them fix it.

This isn't about communication or a sysadmin whining to the devs about 
something he doesn't understand. This is a resource leak. It is 
apparently well-understood. He's done his homework. They are clowns.

-chris

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



Re: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread Stephen Carville
On Monday March 01 2004 06:42 pm, Christopher Schultz wrote:

  Tried that.  Capped it at 35 and the webserver stopped servicing any
  DB request as soon as the pool reached 35.  This is why I believe the
  pool management is faulty and/or something is hogging all the
  connections.
 
  I share your belief. Let's try to prove it. Raise it to some other
  figure, and see if the same happens again. Ask them how big should the
  figure be.

 In fact, cap it at 10 and watch the app dring to a halt before it even
 gets going. This is a pretty compelling example. If the pool is drying
 up, they're definately screwing up.

Whoa there pardner:  I am not going to deliberately cripple a production box. 
The problem has been demonstated in test environments and that is as far as I 
will intentionally let it go.
 
That said, the information i've gathered here has been helpful.  I am a great 
sysadmin but not a great java programmer so I appreciate it to.

-- 
Stephen Carville
UNIX and Network Administrator
DPSI
310-342-3602
[EMAIL PROTECTED]
--
Most people prefer believing their leaders are just and fair even in the face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that  
the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.


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



RE: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread Ralph Einfeldt
No that's not true, 

My colleges and me are doing both sides of the border 
(me being mainly a developer, others being mainly sysadmins
but we don't have any person that's not doing at least 20%
of the other side's job (It's a bit of pair sysadministration)

I don't like the notion of pure programmers and pure sys admins.
(If the the organsation gets big enough you need such roles, but
it's alway good to have some people in each group that know the 
other side well enough)

 -Original Message-
 From: Kannan Sundararajan [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 02, 2004 4:31 PM
 To: 'Tomcat Users List'
 Subject: RE: Virtual Hosts with Apache and Tomcat
 
 Sysadmins are sysadmins AND developers are developers. No one 
 cannot cross the borderline or even compare. 
 

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



Re: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread Christopher Schultz
Stephen,

In fact, cap it at 10 and watch the app dring to a halt before it even
gets going. This is a pretty compelling example. If the pool is drying
up, they're definately screwing up.
Whoa there pardner:  I am not going to deliberately cripple a production box. 
The problem has been demonstated in test environments and that is as far as I 
will intentionally let it go.
Oh, I totally meant in a development setting. I would never suggest that 
you cripple a production box. You can easily demonstrate the problem. Do 
that in dev, and make them fix it. Then, deploy the fix as part of your 
regular deployment procedure.

-chris


signature.asc
Description: OpenPGP digital signature


RE: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread Kannan Sundararajan
Yes, But that doesn't mean that we can put and point on developers for any
problem.

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 10:59 AM
To: Tomcat Users List
Subject: RE: Virtual Hosts with Apache and Tomcat


No that's not true, 

My colleges and me are doing both sides of the border 
(me being mainly a developer, others being mainly sysadmins
but we don't have any person that's not doing at least 20%
of the other side's job (It's a bit of pair sysadministration)

I don't like the notion of pure programmers and pure sys admins.
(If the the organsation gets big enough you need such roles, but
it's alway good to have some people in each group that know the 
other side well enough)

 -Original Message-
 From: Kannan Sundararajan [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 02, 2004 4:31 PM
 To: 'Tomcat Users List'
 Subject: RE: Virtual Hosts with Apache and Tomcat
 
 Sysadmins are sysadmins AND developers are developers. No one 
 cannot cross the borderline or even compare. 
 

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

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



Re: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread Christopher Schultz
Kennan,

I can agree partially to yours. But if you see him, he doesn't know about
the impact of JVM and tuning parameters, as he mentioned in his email. Do
you expect him to take a lead in fixing that? I have seen the projects
losing its focus by the nature of peoples deviating to get their interests
fulfilled.
This is not a 'special' interest. This is a legitimate resource leak 
that he wants them to fix. He can demonstrate the leak. That's all 
that's necessary on his part. The rest is up to the developers. I'm not 
suggesting that he fix the problem. Only to demonstrate it and get the 
developers to fix the problem.

I would appreciate, if the developer and sysadmin working together in this
problem (i doubt verymuch as sysadmin involvment, all he can do is give
top or sar reports). Sysadmin has much knowledge in configuring servers,
architect the infrastructure, manage the network, backups etc. 
Yes, but *this* sysadmin also has enpirical data that demonstrates the 
resource leak. Forget sar and top. How about the app locks up. That 
should be motivating enough.

I never seen any sysadmin trying to fine tune any Application Servers.
Actually, the sysadmin is the /perfect/ person to fine-tune app servers. 
Most devs don't know jack about the app server they use. That's why they 
deploy onto app servers with standard interfaces and services (Servlet 
and JSP spec). The deployment and admin folks are the ones who should 
know how to configure the app servers.

If
that is the case, then the project sucess will be in stake. Everyone has to
do their own roles. If I would be the sysadmin, then i would tell the
developers to go these newsgroups. Dont you think that most of developers
resolve their issues by newsgroups and websites for their problems. 
Here's the problem: the devs refuse to admit there's a problem. They 
won't go to the newsgroups to ask about a problem that they don't 
believe exists. That's why the sysadmin is here. He wanted to get some 
information on how to prove that there's a leak. He's gotton that 
information. Let's wait for the devs to visit the group, now ;)

He clearly mentioned that the developeers raised that questions and trying
to get the verification from the newsgroups. Dont you think that is the part
of communication gap between the developers and him. If he is very keen, why
not one of the developers responding his thread and get the issues fixed for
the project. 
I think the problem is that the devs think the sysadmin is foolish and 
wrong about the resource leak. Now that he can demonstrate the leak, 
they will take him more seriously.

I believe that we have helped in this situation, and that the devs will 
now address the problem instead of sticking their heads in the sand.

-chris


signature.asc
Description: OpenPGP digital signature


Re: Virtual Hosts with Apache and Tomcat

2004-03-02 Thread rsequeira

With due respect to everyone's opinion on this thread, I really appreciate
it if this topic was taken offline. I think other than filling up people's
mailbox, I don't seem to see any technical knowledge being shared.
Just my 2 cents.

Thanks,
RS


   
   
  Christopher Schultz  
   
  [EMAIL PROTECTED]To:   Tomcat Users List
 
  omcast.net  [EMAIL PROTECTED] 
  
  cc:  
   
  03/02/2004 10:42 AM Subject:  Re: Virtual Hosts with 
Apache and Tomcat  
  Please respond to
   
  Tomcat Users List  
   
   
   
   
   




Kennan,

 I can agree partially to yours. But if you see him, he doesn't know about
 the impact of JVM and tuning parameters, as he mentioned in his email. Do
 you expect him to take a lead in fixing that? I have seen the projects
 losing its focus by the nature of peoples deviating to get their
interests
 fulfilled.

This is not a 'special' interest. This is a legitimate resource leak
that he wants them to fix. He can demonstrate the leak. That's all
that's necessary on his part. The rest is up to the developers. I'm not
suggesting that he fix the problem. Only to demonstrate it and get the
developers to fix the problem.

 I would appreciate, if the developer and sysadmin working together in
this
 problem (i doubt verymuch as sysadmin involvment, all he can do is give
 top or sar reports). Sysadmin has much knowledge in configuring
servers,
 architect the infrastructure, manage the network, backups etc.

Yes, but *this* sysadmin also has enpirical data that demonstrates the
resource leak. Forget sar and top. How about the app locks up. That
should be motivating enough.

 I never seen any sysadmin trying to fine tune any Application Servers.

Actually, the sysadmin is the /perfect/ person to fine-tune app servers.
Most devs don't know jack about the app server they use. That's why they
deploy onto app servers with standard interfaces and services (Servlet
and JSP spec). The deployment and admin folks are the ones who should
know how to configure the app servers.

 If
 that is the case, then the project sucess will be in stake. Everyone has
to
 do their own roles. If I would be the sysadmin, then i would tell the
 developers to go these newsgroups. Dont you think that most of developers
 resolve their issues by newsgroups and websites for their problems.

Here's the problem: the devs refuse to admit there's a problem. They
won't go to the newsgroups to ask about a problem that they don't
believe exists. That's why the sysadmin is here. He wanted to get some
information on how to prove that there's a leak. He's gotton that
information. Let's wait for the devs to visit the group, now ;)

 He clearly mentioned that the developeers raised that questions and
trying
 to get the verification from the newsgroups. Dont you think that is the
part
 of communication gap between the developers and him. If he is very keen,
why
 not one of the developers responding his thread and get the issues fixed
for
 the project.

I think the problem is that the devs think the sysadmin is foolish and
wrong about the resource leak. Now that he can demonstrate the leak,
they will take him more seriously.

I believe that we have helped in this situation, and that the devs will
now address the problem instead of sticking their heads in the sand.

-chris
(See attached file: signature.asc)




This transmission is intended to be strictly confidential. If you are not
the intended recipient of this message, you may not disclose, print, copy
or disseminate this information. If you have received this in error, please
reply and notify the sender (only) and delete the message. Unauthorized
interception of this e-mail is a violation of federal criminal law.

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

Re: Virtual Hosts with Apache and Tomcat

2004-03-01 Thread Stephen Carville
Here is some more information on the problem. From a developer:

According to the document that the link below refers to, a single
instance of Tomcat will have multiple JVMs, where each JVM represents a
virtual host.  The following link clearly states this virtual host concept
as it applies to Tomcat.
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html
(please refer the virtual host section).}

As per the above document, each JVM corresponding to a virtual host
contains a database connection pool object. Hence the connection pool that
has been implemented seems to be in-line with the virtual host definition in
the above document.

Also, we are also using the same concept of DBCP in our
applications. The difference in our case is that we have chosen to use
Oracle that also uses the same DataSource class.

OK, it is my understanding that the problem of a new JVM for each virtual host 
was fixed in 4.X.  True?

I RT'ed some more FM on 4.2 and found that the Tomcat developers suggest that 
the connection code be placed in $CATALINA_HOME/common/lib.  I passed that to 
the developers and:

As regards putting the flood.jar in $CATALINA_HOME/common/lib, we
tried it and the behavior was no different.

Is there anyone running tomcat with virtual hosts and do you also have this 
problem?  It is a little hard to beleive this is so difficult to implement 
but hasn't come up before. (at least I couldn't find it in the archives)

-- 
Stephen Carville
UNIX and Network Administrator
DPSI
310-342-3602
[EMAIL PROTECTED]
--
Most people prefer believing their leaders are just and fair even in the face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that  
the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.


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



RE: Virtual Hosts with Apache and Tomcat

2004-03-01 Thread Mike Curwen
I have a sneaking suspicion that someone is still blowing smoke. ;)  
Either
1) the oracle pool has a leak
2) oracle server has a problem closing connections
3) you have a leak in the application.
 
For problem 3), I find the DBCP's ability to 'tattle' on bad JSP
pages/classes invaluable in tracking down this type of behaviour.  
 
Here's a (big) snip. I've removed a bunch of parameters, as they would
change for your app. But the key ones are included at the bottom.

Context path= 
 docBase=/home/webhome/buzz/ 
 defaultSessionTimeout=60 
 reloadable=true


Resource   name=jdbc/BuzzDB
auth=Container
type=javax.sql.DataSource /

ResourceParams name=jdbc/BuzzDB

parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Max number of dB connections. Set to 0 for no limit. --

!-- Max number of idle dB connections to retain. Set to 0 for
no limit. --

!-- Max wait for dB connection to become available
(in ms), -1 to wait indefinitely. --

!-- MySQL dB username, password, driver, URL  --


parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value20/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
/ResourceParams

When you have a mis-behaving JSP (one that doesn't return its
connection), you'll get a stack trace in catalina.out (or wherever you
have redirected catalina.out) that contains the name of the JSP or class
that did not return a connection, and that was forced abandoned by the
pool. With the above config, this happens in 20 seconds (though it won't
be logged until the *next* access of the pool).  I'm not familiar with
the Oracle drivers, but hopefully they have something similar?
 
The reason I think your developers are blowing smoke... You are using
4.1.x and they are quoting 3.x docs.  They should know better!



 -Original Message-
 From: Stephen Carville [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 01, 2004 9:18 AM
 To: Tomcat Users List
 Subject: Re: Virtual Hosts with Apache and Tomcat
 
 
 Here is some more information on the problem. From a developer:
 
 According to the document that the link below refers to, a 
 single instance of Tomcat will have multiple JVMs, where each 
 JVM represents a virtual host.  The following link clearly 
 states this virtual host concept as it applies to Tomcat. 
 http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html
 (please refer the virtual host section).}
 
 As per the above document, each JVM corresponding to a 
 virtual host contains a database connection pool object. 
 Hence the connection pool that has been implemented seems to 
 be in-line with the virtual host definition in the above document.
 


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



RE: Virtual Hosts with Apache and Tomcat

2004-03-01 Thread Kannan Sundararajan
Being yourself as SYSADMIN for UNIX and Network, it would be nice that
developers or professional should take a lead into get into this problem.

It looks like that to me that it has been stepping or bossing up the
developers up there. And since there is lot of techonology involved, it
would be much difficult for anyone to fix your problem. I guess there might
be some senior developer, who can do the situation much better. 

You have been trying to getinto JVMs and tuning and so on... the best is
developers to be involved actively. 

There could be lot of documents and phrases from a developer side, which you
are conveying. But for me looks like that you are trying to put your own
things into them, which may be difficult as a communication area of project
management( which is very crucial to success of a project).

-Original Message-
From: Stephen Carville [mailto:[EMAIL PROTECTED]
Sent: Monday, March 01, 2004 10:18 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts with Apache and Tomcat


Here is some more information on the problem. From a developer:

According to the document that the link below refers to, a single
instance of Tomcat will have multiple JVMs, where each JVM represents a
virtual host.  The following link clearly states this virtual host concept
as it applies to Tomcat.
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html
(please refer the virtual host section).}

As per the above document, each JVM corresponding to a virtual host
contains a database connection pool object. Hence the connection pool that
has been implemented seems to be in-line with the virtual host definition in
the above document.

Also, we are also using the same concept of DBCP in our
applications. The difference in our case is that we have chosen to use
Oracle that also uses the same DataSource class.

OK, it is my understanding that the problem of a new JVM for each virtual
host 
was fixed in 4.X.  True?

I RT'ed some more FM on 4.2 and found that the Tomcat developers suggest
that 
the connection code be placed in $CATALINA_HOME/common/lib.  I passed that
to 
the developers and:

As regards putting the flood.jar in $CATALINA_HOME/common/lib, we
tried it and the behavior was no different.

Is there anyone running tomcat with virtual hosts and do you also have this 
problem?  It is a little hard to beleive this is so difficult to implement 
but hasn't come up before. (at least I couldn't find it in the archives)

-- 
Stephen Carville
UNIX and Network Administrator
DPSI
310-342-3602
[EMAIL PROTECTED]
--
Most people prefer believing their leaders are just and fair even in the
face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that

the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.


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

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



Re: Virtual Hosts with Apache and Tomcat

2004-03-01 Thread Christopher Schultz
Antonio,

And bad.  Every time I restart, Tomcat loses the state information for 
established login sessions.  Customer don't like that.
That (with a high probability) is because some objects they store in 
sessions are not Serializable. IOW, they violate the Servlet Specification.
I'm just curious: is this actually a violation of the servlet spec? The 
API seems to indicate that you can put anything in the session that you 
want. I don't think it has to be Serializable... thought I was wrong 
before, once ;)

Tried that.  Capped it at 35 and the webserver stopped servicing any 
DB request as soon as the pool reached 35.  This is why I believe the 
pool management is faulty and/or something is hogging all the 
connections.
I share your belief. Let's try to prove it. Raise it to some other 
figure, and see if the same happens again. Ask them how big should the 
figure be.
In fact, cap it at 10 and watch the app dring to a halt before it even 
gets going. This is a pretty compelling example. If the pool is drying 
up, they're definately screwing up.

Oracle 9i takes 16M per connections.  So Oracle claims.  I've tested 
it as high as 20M.  I generally use 18M as a guideline
I've heard (not a DBA, though) that Oracle 9i has a mode where it does 
not spawn a process per connection, but uses threads instead (?) and in 
that mode it uses far less resources. This way, we have some modest 
Oracle servers hjandling up to 300 simultaneous (mostly idle) connections.
It depends on the size of your rollback segments and the number of 
transactions you are doing. If you do big transactions, each DB 
connection (thread *or* process) wioll need a big chunk of memory. I 
wouldn't kill yourself trying to figure out how to reduce this process 
size. Fix the real problem, which is poor connection management.

I'll mention DBCP and see what happens
DBCP has a nice removeAbandoned feature.

Otherwise, you can use this code (tweak it to your needs) to track where 
connections are opened and closed from:

(code not tested at all)

// open method signature
// code that opens the connection (and stores it in conn variable)
try {
throw new Exception(Pool Debugger says: Connection  + conn +  
opened:);
} catch (Exception e) {
e.printStackTrace();
}
I've seen code like this before. Many people think you can't get a stack 
trace unless you throw an exception. Not so. All you have to do is 
instantiate it, and you get the stack trace. So, the following will 
produce identical results, without the nasty try/throw/catch:

new Exception(Pool debugged says: ...).printStackTrace();

I would recommend explicitly printing out the hashCode of the Connection 
object itself, just in case the connection doesn't include any 
identifying information in it's .toString method.

Then you can...
#!/bin/sh
# Filter pool debugger statements.
This is a pretty good idea for some basic debugging. You should only 
have to demonstrate to your devs that you can deadlock their server by 
capping the connection pool. After that, it's their problem, right? :)

-chris


signature.asc
Description: OpenPGP digital signature


Re: Virtual Hosts with Apache and Tomcat

2004-03-01 Thread Christopher Schultz
Kannan,

Being yourself as SYSADMIN for UNIX and Network, it would be nice that
developers or professional should take a lead into get into this problem.
Easy for you to say.

Let's face it: these guys have a connection leak. Plain and simple. Your 
devs need to find their leak. It is demonstrable. It locks up the 
server. QED. Make them fix it.

This isn't about communication or a sysadmin whining to the devs about 
something he doesn't understand. This is a resource leak. It is 
apparently well-understood. He's done his homework. They are clowns.

-chris


signature.asc
Description: OpenPGP digital signature


Re: Virtual Hosts with Apache and Tomcat

2004-03-01 Thread Antonio Fiol BonnĂ­n

That (with a high probability) is because some objects they store in 
sessions are not Serializable. IOW, they violate the Servlet 
Specification.


I'm just curious: is this actually a violation of the servlet spec? 
The API seems to indicate that you can put anything in the session 
that you want. I don't think it has to be Serializable... thought I 
was wrong before, once ;)


I'm not 100% sure. What I am sure is that you cannot user session 
replication or session persistence without this.


Tried that.  Capped it at 35 and the webserver stopped servicing any 
DB request as soon as the pool reached 35.  This is why I believe the 
pool management is faulty and/or something is hogging all the 
connections.

In fact, cap it at 10 and watch the app dring to a halt before it even 
gets going. This is a pretty compelling example. If the pool is drying 
up, they're definately screwing up.


It is. But developers may reply: You are using less connections than 
those specified in (the contract) / (the manual) / (fill in yourself).


It depends on the size of your rollback segments and the number of 
transactions you are doing. If you do big transactions, each DB 
connection (thread *or* process) wioll need a big chunk of memory. I 
wouldn't kill yourself trying to figure out how to reduce this process 
size. Fix the real problem, which is poor connection management.


No doubt...


I've seen code like this before. Many people think you can't get a 
stack trace unless you throw an exception. Not so. All you have to do 
is instantiate it, and you get the stack trace. So, the following will 
produce identical results, without the nasty try/throw/catch:

new Exception(Pool debugged says: ...).printStackTrace();


I thought I had tried that (JDK1.3) and I thought it had not worked. 
Glad to know it does...


I would recommend explicitly printing out the hashCode of the 
Connection object itself, just in case the connection doesn't include 
any identifying information in it's .toString method.


Oh. Of course... I never happened to come across such a braindead 
Connection class.



Then you can...
#!/bin/sh
# Filter pool debugger statements.


This is a pretty good idea for some basic debugging. You should only 
have to demonstrate to your devs that you can deadlock their server by 
capping the connection pool. After that, it's their problem, right? :)


With the proposal, you demonstrate they have a connection leak, which is 
the real problem.

Once you showed them they had ONE connection leak, you can urge them to 
dig for other connection leaks themselves.

But, of course, the idea about the deadlock seems really good also. If I 
understood, what you mean is: If you set the connection pool size too 
low for the app, it should crash at will (or better, show an 
'unavailable' screen), but it should continue working as soon as load 
permits it. Am I wrong?

Yours,

Antonio Fiol





smime.p7s
Description: S/MIME Cryptographic Signature


Virtual Hosts with Apache and Tomcat

2004-02-29 Thread Stephen Carville
I am having a problem with tomcat opening up up a number of connections to an 
oracle server that never get closed.  This causes the number of open 
connections to build up over time and, eventually, causes the oracle server 
to use all of its swap.  Restarting tomcat clers this up.

I think there is a problem with some jsp's opening connections and then not 
closig them but the developers claim (surprise) their code is clean.  The 
explanation they give is:

The increase in number of connections beyond the CACHE_MAX_SIZE setting in 
the app1.properties file is due to the private labeled sites. For each 
virtual host (private labeled site), there will be a separate JVM running the 
Tomcat web server space. For each of these JVMs, there will be a separate 
database connection cache pool to serve the user requests. This is the 
designed functionality of a web server that will support virtual hosts.

I don't know tomcat near as well as I do Apache but this sounds like someone 
is blowing smoke.  If I run ps on the server it looks to me like there is 
only one instance and if I restart tomcat, _all_ virtual hosts are restarted.  
As near as I can tell from RTFM, tomcat fully supports named based virtual 
domains since about 3.2 or so.

I am using:

Redhat Linux 7.2
Kernel: 2.4.7-10
Apache: 1.3.22
Tomcat: 4.1.24
mod_jk: 1.2.4

I don't care who is right or wrong but I do want to clear up this problem.  
Any ideas?  If you need any more information, just ask.

-- 
Stephen Carville
UNIX and Network Administrator
DPSI
310-342-3602
[EMAIL PROTECTED]
--
Most people prefer believing their leaders are just and fair even in the face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that  
the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.

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



Re: Virtual Hosts with Apache and Tomcat

2004-02-29 Thread Christopher Schultz
Stephen,

I am having a problem with tomcat opening up up a number of connections to an 
oracle server that never get closed.  This causes the number of open 
connections to build up over time and, eventually, causes the oracle server 
to use all of its swap.
That's not good :(

Restarting tomcat clers this up.
That's good! :)

I think there is a problem with some jsp's opening connections and then not 
closig them but the developers claim (surprise) their code is clean.
It's tough to make sure that database connections (and statements, and 
result sets) get cleaned up in JSPs, unless you have a talented JSP 
author. (Most JSP authors aren't that talented, unless they are also 
good Java developers, in which case they would have implemented the DB 
access in a servlet and just used the JSP for display. Anywho...)

If the number of connections keeps going up and never tapers off or 
stops altogether, then something is misconfigured with your connection 
pools. Even if the engineers say that the pages are clean, you should 
protect the app server (and the DB server) from being swamped by capping 
the number of DB connections allowed. Ever. Any decent DB connection 
pool lets you specify this kind of thing. You should set that value to 
something reasonable. You can get away with a suprisingly low number of 
these.

(I was consulting on a big project that was a somewhat DB intensive, 
web-based app. They had the app server configured to accept 75 
simultaneous connections. They also set the db connection pool size to 
75. I asked why and they basically said so that every HTTP connection 
can get a db connection. Duh. I talked to management and make them put 
in debugging information to find out how many connections were ever in 
use simultaneously. Seven. (Suckers). They also didn't realize that 
Oracle takes like 10MB per connection on the backend, and they had six 
physical app servers running two separate copies of the application. 
That's 75 * 6 * 2 * 10MB = 900MB. Good thing the DB server had 3.5GB of 
RAM, but still...)

The explanation they give is:

The increase in number of connections beyond the CACHE_MAX_SIZE setting in 
the app1.properties file is due to the private labeled sites. For each 
virtual host (private labeled site), there will be a separate JVM running the 
Tomcat web server space. For each of these JVMs, there will be a separate 
database connection cache pool to serve the user requests. This is the 
designed functionality of a web server that will support virtual hosts.

I don't know tomcat near as well as I do Apache but this sounds like someone 
is blowing smoke.
This isn't too outrageous, actually. If each webapp has its own 
connection pool, and they are configured to have at maximum, say, 10 
connections, then you'll probably end up with 10 * webapp_count 
connections to the database server, regardless of the number of 
Tomcats/JVMs are running.

If Tomcat is configured to handle the connection to the database (say, 
through a Realm and a JNDI-configured connection pool), you might be 
able to share connections between all of the webapps. If you solve the 
private-labelling problem by using multiple webapps, but through the 
same database, this approach seems like an excellent idea; configure 
Tomcat to provide a JNDI-based connection pool, and then configure the 
separate applications to use that pool. That way, you can control the 
total number of connections across all private labels, instead of having 
them be independent.

If I run ps on the server it looks to me like there is 
only one instance and if I restart tomcat, _all_ virtual hosts are restarted.
Yeah, then it's definately separate webapps running on a single instance 
of Tomcat. Try to pitch the above idea to your engineers and see what 
they say (probably something like it's fine the way it is!).

I don't care who is right or wrong but I do want to clear up this problem.  
Any ideas?  If you need any more information, just ask.
I think I'd need to know if the connections were really never going 
away. Use netstat to find out what state they're in. If they all say 
ESTABLISHED, then you've got a connection leak. If many of them say 
TIME_WAIT or something like that, then you might have a problem with 
either the client or the server not properly hanging up the phone. If 
it's the former, then yell at your engineers. Cap that connection pool 
size at something reasonable, like ten connections. After that, the 
application starves. That's good for the app server and the database, 
while bad for your application. You can use Jakarta Commons' DBCP as 
your connections pool. It has some wonderful debug options, like giving 
you a stack trace for the code that obtained the connection if that 
connection isn't returned within a certain amount of time. That can save 
days or weeks of code reviews. If your connections are in TIME_WAIT, see 
how long they stay that way. Waiting 5-10 minutes for a connection like 
that to get 

Re: Virtual Hosts with Apache and Tomcat

2004-02-29 Thread Stephen Carville
On Sunday February 29 2004 11:58 am, Christopher Schultz wrote:
 Stephen,

  I am having a problem with tomcat opening up up a number of connections
  to an oracle server that never get closed.  This causes the number of
  open connections to build up over time and, eventually, causes the oracle
  server to use all of its swap.

 That's not good :(

Tell me about it :-)

  Restarting tomcat clers this up.

 That's good! :)

And bad.  Every time I restart, Tomcat loses the state information for 
established login sessions.  Customer don't like that.

  I think there is a problem with some jsp's opening connections and then
  not closig them but the developers claim (surprise) their code is clean.

 It's tough to make sure that database connections (and statements, and
 result sets) get cleaned up in JSPs, unless you have a talented JSP
 author. (Most JSP authors aren't that talented, unless they are also
 good Java developers, in which case they would have implemented the DB
 access in a servlet and just used the JSP for display. Anywho...)

I know they use ODBC for the database connections and there is a pool manager 
in there somewhere.  there is a jar file shared by all the jsp's that handles 
the connection pooling and a bunch of other stuff.  The pool manager is 
PoolmanBean.class.  I don't know enough about Java to say if that is a 
standard library or not.

I guess I don't know a lot about this case but I'm learning more :-)

Anyway, right after startup there are 10 connections.  If I open the main page 
and login, opens another connection closes.  Logging out adds another 
connection.  Both of these close but, apparently, none  of the tne original 
connectiions are not being used and, as time goes on, more connections get 
added to this anomolous pool.

I see someone just uploaded a new version of the jar file with the connection 
code in it so teh above may not be accurate

 If the number of connections keeps going up and never tapers off or
 stops altogether, then something is misconfigured with your connection
 pools. Even if the engineers say that the pages are clean, you should
 protect the app server (and the DB server) from being swamped by capping
 the number of DB connections allowed. Ever. Any decent DB connection
 pool lets you specify this kind of thing. You should set that value to
 something reasonable. You can get away with a suprisingly low number of
 these.

Tried that.  Capped it at 35 and the webserver stopped servicing any DB 
request as soon as the pool reached 35.  This is why I believe the pool 
management is faulty and/or something is hogging all the connections.

 (I was consulting on a big project that was a somewhat DB intensive,
 web-based app. They had the app server configured to accept 75
 simultaneous connections. They also set the db connection pool size to
 75. I asked why and they basically said so that every HTTP connection
 can get a db connection. Duh. I talked to management and make them put
 in debugging information to find out how many connections were ever in
 use simultaneously. Seven. (Suckers). They also didn't realize that
 Oracle takes like 10MB per connection on the backend, and they had six
 physical app servers running two separate copies of the application.
 That's 75 * 6 * 2 * 10MB = 900MB. Good thing the DB server had 3.5GB of
 RAM, but still...)

Oracle 9i takes 16M per connections.  So Oracle claims.  I've tested it as 
high as 20M.  I generally use 18M as a guideline

  The explanation they give is:
 
  The increase in number of connections beyond the CACHE_MAX_SIZE
  setting in the app1.properties file is due to the private labeled sites.
  For each virtual host (private labeled site), there will be a separate
  JVM running the Tomcat web server space. For each of these JVMs, there
  will be a separate database connection cache pool to serve the user
  requests. This is the designed functionality of a web server that will
  support virtual hosts.
 
  I don't know tomcat near as well as I do Apache but this sounds like
  someone is blowing smoke.

 This isn't too outrageous, actually. If each webapp has its own
 connection pool, and they are configured to have at maximum, say, 10
 connections, then you'll probably end up with 10 * webapp_count
 connections to the database server, regardless of the number of
 Tomcats/JVMs are running.

 If Tomcat is configured to handle the connection to the database (say,
 through a Realm and a JNDI-configured connection pool), you might be
 able to share connections between all of the webapps. If you solve the
 private-labelling problem by using multiple webapps, but through the
 same database, this approach seems like an excellent idea; configure
 Tomcat to provide a JNDI-based connection pool, and then configure the
 separate applications to use that pool. That way, you can control the
 total number of connections across all private labels, instead of having
 them be independent.

  If I run ps on the 

RE: Virtual Hosts with Apache and Tomcat

2004-02-29 Thread Ralph Einfeldt

Your developers may be right in the end but with wrong arguments.

With virtual hosting or several webapps you have just one jvm.

But each webapp has it's own classloader.
If the pool is loaded by the wepapp classloader you will have
one instance of the pool for each webapp.


 -Original Message-
 From: Stephen Carville [mailto:[EMAIL PROTECTED]
 Sent: Sunday, February 29, 2004 5:48 PM
 To: Tomcat Users
 Subject: Virtual Hosts with Apache and Tomcat
 
 
 The increase in number of connections beyond the 
 CACHE_MAX_SIZE setting in 
 the app1.properties file is due to the private labeled sites. 
 For each virtual host (private labeled site), there will be 
 a separate JVM running the Tomcat web server space. For each 
 of these JVMs, there will be a separate  database connection 
 cache pool to serve the user requests. 
 This is the designed functionality of a web server that will 
 support virtual hosts.
 


Re: Virtual Hosts with Apache and Tomcat

2004-02-29 Thread Antonio Fiol Bonnn
Stephen Carville wrote:

Restarting tomcat clers this up.
 

That's good! :)
   

And bad.  Every time I restart, Tomcat loses the state information for 
established login sessions.  Customer don't like that.
 

That (with a high probability) is because some objects they store in 
sessions are not Serializable. IOW, they violate the Servlet Specification.

I think there is a problem with some jsp's opening connections and then
not closig them but the developers claim (surprise) their code is clean.
 

It's tough to make sure that database connections (and statements, and
result sets) get cleaned up in JSPs, unless you have a talented JSP
author. (Most JSP authors aren't that talented, unless they are also
good Java developers, in which case they would have implemented the DB
access in a servlet and just used the JSP for display. Anywho...)
   

I know they use ODBC for the database connections and there is a pool manager 
in there somewhere.  there is a jar file shared by all the jsp's that handles 
the connection pooling and a bunch of other stuff.  The pool manager is 
PoolmanBean.class.  I don't know enough about Java to say if that is a 
standard library or not.

I guess I don't know a lot about this case but I'm learning more :-)

Anyway, right after startup there are 10 connections.  If I open the main page 
and login, opens another connection closes.  Logging out adds another 
connection.  Both of these close but, apparently, none  of the tne original 
connectiions are not being used and, as time goes on, more connections get 
added to this anomolous pool.

I see someone just uploaded a new version of the jar file with the connection 
code in it so teh above may not be accurate
 

Most developers think their code is beautiful, and so on (and I am a 
developer)... unless you prove they are wrong. One point on your side is 
that they probably *are* wrong.


If the number of connections keeps going up and never tapers off or
stops altogether, then something is misconfigured with your connection
pools. Even if the engineers say that the pages are clean, you should
protect the app server (and the DB server) from being swamped by capping
the number of DB connections allowed. Ever. Any decent DB connection
pool lets you specify this kind of thing. You should set that value to
something reasonable. You can get away with a suprisingly low number of
these.
   

Tried that.  Capped it at 35 and the webserver stopped servicing any DB 
request as soon as the pool reached 35.  This is why I believe the pool 
management is faulty and/or something is hogging all the connections.
 

I share your belief. Let's try to prove it. Raise it to some other 
figure, and see if the same happens again. Ask them how big should the 
figure be.


(I was consulting on a big project that was a somewhat DB intensive,
web-based app. They had the app server configured to accept 75
simultaneous connections. They also set the db connection pool size to
75. I asked why and they basically said so that every HTTP connection
can get a db connection. Duh. I talked to management and make them put
in debugging information to find out how many connections were ever in
use simultaneously. Seven. (Suckers). They also didn't realize that
Oracle takes like 10MB per connection on the backend, and they had six
physical app servers running two separate copies of the application.
That's 75 * 6 * 2 * 10MB = 900MB. Good thing the DB server had 3.5GB of
RAM, but still...)
   

Oracle 9i takes 16M per connections.  So Oracle claims.  I've tested it as 
high as 20M.  I generally use 18M as a guideline
 

I've heard (not a DBA, though) that Oracle 9i has a mode where it does 
not spawn a process per connection, but uses threads instead (?) and in 
that mode it uses far less resources. This way, we have some modest 
Oracle servers hjandling up to 300 simultaneous (mostly idle) connections.


Cap that connection pool
size at something reasonable, like ten connections. After that, the
application starves. That's good for the app server and the database,
while bad for your application. You can use Jakarta Commons' DBCP as
your connections pool. It has some wonderful debug options, like giving
you a stack trace for the code that obtained the connection if that
connection isn't returned within a certain amount of time. That can save
days or weeks of code reviews. If your connections are in TIME_WAIT, see
how long they stay that way. Waiting 5-10 minutes for a connection like
that to get cleaned up is not unheard of. If they're piling up on top of
one anothor and /never/ going away, it's time to talk to a system
administrator. If the syadmin is you, it's time to talk to the guy you
go to when you don't know things. Everyone needs a guy (or girl!) like
that. :)
   

I'll mention DBCP and see what happens
 

DBCP has a nice removeAbandoned feature.

Otherwise, you can use this code (tweak it to your needs) to track where 
connections are opened and 

RE: JK and multiple virtual hosts on Apache (repost)

2002-12-09 Thread Robert L Sowders
This has come up quite often in the past.  Search the archives for 
JkUriSet.  When using apache/modssl make sure you use IP based virtual 
hosts.

rls





Madere, Colin [EMAIL PROTECTED]
12/08/2002 08:00 PM
Please respond to Tomcat Users List

 
To: 'Tomcat Users List' [EMAIL PROTECTED]
cc: 
Subject:RE: JK and multiple virtual hosts on Apache (repost)


Thanks for the input, but I don't want any port numbers in the URLs for a
number of reasons.  Hence my use of the JK connector (that and only 
wanting
to set up SSL through Apache and not Tomcat).

I'm quite surprised no one else on this list has a setup similar to what 
I'm
doing

 -Original Message-
 From:  David Brown [SMTP:[EMAIL PROTECTED]]
 Sent:  Friday, December 06, 2002 7:48 PM
 To:'Tomcat Users List'
 Subject:   Re: JK and multiple virtual hosts on Apache 
(repost)
 
 Madere, Colin writes: 
 
  I might have had some list trouble so I'm reposting this (since I got 
no
  responses so far). 
  
  -Original Message-
  From:   Madere, Colin [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, December 05, 2002 5:55 PM
  To: '[EMAIL PROTECTED]'
  Subject:4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK 
connectors? 
  
  Before I go off into JK configuration craziness, I thought I'd post 
my
  situation and see what rises to the top. 
  
  What I have: 
  
  1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL)
  1 Tomcat 4.12 (no virtual hosts as of yet)
  1 JK 1.2.0 connector working properly with the non-SSL host from 
Apache
 
  
  What I want to do: 
  
  Have any requests for apps running on Tomcat from any of the 4 
virtual
  hosts
  to be redirected to the same Tomcat instance.  This is mainly for
  simplicity
  since I will be using Tomcat Realms for login to determine what to do
 for
  a
  user in the app based on role.  If I have to do 4 virtual hosts in
 Tomcat,
  then let me know :) 
  
  Is the correct way to make this work with JK to create 4 
Connector
  instances at, say, ports 8009-8012 in my tomcat server.xml, then set 
up
 4
  JK
  workers in workers.properties with each respective virtual host's
 domain
  name and redirection port?  Or is there some way to use a single
  connector?
  (I'm guessing NOT the latter due to the port probably being bound by
 the
  connector process) 
  
  Having said this and if my former idea is the correct way, for the 
JK
  connector entry in my Tomcat server.xml, is the redirectPort
 arbitrarily
  chosen?  I have 8443 in for my single connector/site/host setup, 
would
 I
  simply use 8443-8446? 
  
  Any input on this setup appreciated. 
  
  
  --
  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] 
  
 
 
 Hello Colin, i'm unsure about advising on this because i'm running the 
 non-threading apache 1.3.27. i have a very similar setup as u describe
 that 
 works 4 me: i have 4 virtual hosts running on the public wire plus a dns 

 server. the virtual hosts 4 defined in apache only w/ all https 
JDBCRealm 
 protected directories serving jsp and servlets redirected from apache on 

 port 8443. all https cgi-bin is redirected through port 443. otherwise 
all
 
 http is port 80 and 8080 for jsp/servlets. this config is pretty much 
 out-of-the-box w/o any undue config on the tc side except for the 
 JDBCRealm and a custom web.xml for each webapp both secure and 
non-secure.
 
 only server.xml editing done was basically to uncomment the connectors 
for
 
 port 8443 (ssl and non-ssl connectors). no extra stuff like Host tags 
or
 
 anything like that to confuse the issue. hope this helps, david. 
 
 
 --
 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: JK and multiple virtual hosts on Apache (repost)

2002-12-09 Thread Madere, Colin
Those all reference JK2, but I'm using JK (since it is suggested you use JK
in production environments due to stability... not to mention the likely
build problems I'll experience on Solaris 7 ).  Going to hack away at this
for a while and then try to compile JK2 again if all fails.

And yes, I'm using IP-based Virtual Hosts on Apache.


 -Original Message-
 From: Robert L Sowders [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 2:48 AM
 To:   Tomcat Users List
 Subject:  RE: JK and multiple virtual hosts on Apache (repost)
 
 This has come up quite often in the past.  Search the archives for 
 JkUriSet.  When using apache/modssl make sure you use IP based virtual 
 hosts.
 
 rls
 
 
 
 
 
 Madere, Colin [EMAIL PROTECTED]
 12/08/2002 08:00 PM
 Please respond to Tomcat Users List
 
  
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 cc: 
 Subject:RE: JK and multiple virtual hosts on Apache
 (repost)
 
 
 Thanks for the input, but I don't want any port numbers in the URLs for a
 number of reasons.  Hence my use of the JK connector (that and only 
 wanting
 to set up SSL through Apache and not Tomcat).
 
 I'm quite surprised no one else on this list has a setup similar to what 
 I'm
 doing
 
  -Original Message-
  From:  David Brown [SMTP:[EMAIL PROTECTED]]
  Sent:  Friday, December 06, 2002 7:48 PM
  To:'Tomcat Users List'
  Subject:   Re: JK and multiple virtual hosts on Apache 
 (repost)
  
  Madere, Colin writes: 
  
   I might have had some list trouble so I'm reposting this (since I got 
 no
   responses so far). 
   
   -Original Message-
   From:   Madere, Colin [SMTP:[EMAIL PROTECTED]]
   Sent:   Thursday, December 05, 2002 5:55 PM
   To: '[EMAIL PROTECTED]'
   Subject:4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK 
 connectors? 
   
   Before I go off into JK configuration craziness, I thought I'd post 
 my
   situation and see what rises to the top. 
   
   What I have: 
   
   1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL)
   1 Tomcat 4.12 (no virtual hosts as of yet)
   1 JK 1.2.0 connector working properly with the non-SSL host from 
 Apache
  
   
   What I want to do: 
   
   Have any requests for apps running on Tomcat from any of the 4 
 virtual
   hosts
   to be redirected to the same Tomcat instance.  This is mainly for
   simplicity
   since I will be using Tomcat Realms for login to determine what to do
  for
   a
   user in the app based on role.  If I have to do 4 virtual hosts in
  Tomcat,
   then let me know :) 
   
   Is the correct way to make this work with JK to create 4 
 Connector
   instances at, say, ports 8009-8012 in my tomcat server.xml, then set 
 up
  4
   JK
   workers in workers.properties with each respective virtual host's
  domain
   name and redirection port?  Or is there some way to use a single
   connector?
   (I'm guessing NOT the latter due to the port probably being bound by
  the
   connector process) 
   
   Having said this and if my former idea is the correct way, for the 
 JK
   connector entry in my Tomcat server.xml, is the redirectPort
  arbitrarily
   chosen?  I have 8443 in for my single connector/site/host setup, 
 would
  I
   simply use 8443-8446? 
   
   Any input on this setup appreciated. 
   
   
   --
   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] 
   
  
  
  Hello Colin, i'm unsure about advising on this because i'm running the 
  non-threading apache 1.3.27. i have a very similar setup as u describe
  that 
  works 4 me: i have 4 virtual hosts running on the public wire plus a dns
 
 
  server. the virtual hosts 4 defined in apache only w/ all https 
 JDBCRealm 
  protected directories serving jsp and servlets redirected from apache on
 
 
  port 8443. all https cgi-bin is redirected through port 443. otherwise 
 all
  
  http is port 80 and 8080 for jsp/servlets. this config is pretty much 
  out-of-the-box w/o any undue config on the tc side except for the 
  JDBCRealm and a custom web.xml for each webapp both secure and 
 non-secure.
  
  only server.xml editing done was basically to uncomment the connectors 
 for
  
  port 8443 (ssl and non-ssl connectors). no extra stuff like Host tags 
 or
  
  anything like that to confuse the issue. hope this helps, david. 
  
  
  --
  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]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED

RE: JK and multiple virtual hosts on Apache (repost)

2002-12-09 Thread Robert L Sowders
Perhaps this document can help you a little.

rls





Madere, Colin [EMAIL PROTECTED]
12/09/2002 12:13 PM
Please respond to Tomcat Users List

 
To: 'Tomcat Users List' [EMAIL PROTECTED]
cc: 
Subject:RE: JK and multiple virtual hosts on Apache (repost)


Those all reference JK2, but I'm using JK (since it is suggested you use 
JK
in production environments due to stability... not to mention the likely
build problems I'll experience on Solaris 7 ).  Going to hack away at this
for a while and then try to compile JK2 again if all fails.

And yes, I'm using IP-based Virtual Hosts on Apache.


 -Original Message-
 From:  Robert L Sowders [SMTP:[EMAIL PROTECTED]]
 Sent:  Monday, December 09, 2002 2:48 AM
 To:Tomcat Users List
 Subject:   RE: JK and multiple virtual hosts on Apache 
(repost)
 
 This has come up quite often in the past.  Search the archives for 
 JkUriSet.  When using apache/modssl make sure you use IP based virtual 
 hosts.
 
 rls
 
 
 
 
 
 Madere, Colin [EMAIL PROTECTED]
 12/08/2002 08:00 PM
 Please respond to Tomcat Users List
 
 
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 cc: 
 Subject:RE: JK and multiple virtual hosts on Apache
 (repost)
 
 
 Thanks for the input, but I don't want any port numbers in the URLs for 
a
 number of reasons.  Hence my use of the JK connector (that and only 
 wanting
 to set up SSL through Apache and not Tomcat).
 
 I'm quite surprised no one else on this list has a setup similar to what 

 I'm
 doing
 
  -Original Message-
  From:  David Brown [SMTP:[EMAIL PROTECTED]]
  Sent:  Friday, December 06, 2002 7:48 PM
  To:'Tomcat Users List'
  Subject:   Re: JK and multiple virtual hosts on Apache 
 (repost)
  
  Madere, Colin writes: 
  
   I might have had some list trouble so I'm reposting this (since I 
got 
 no
   responses so far). 
   
   -Original Message-
   From:   Madere, Colin [SMTP:[EMAIL PROTECTED]]
   Sent:   Thursday, December 05, 2002 5:55 PM
   To: '[EMAIL PROTECTED]'
   Subject:4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK 
 connectors? 
   
   Before I go off into JK configuration craziness, I thought I'd post 

 my
   situation and see what rises to the top. 
   
   What I have: 
   
   1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL)
   1 Tomcat 4.12 (no virtual hosts as of yet)
   1 JK 1.2.0 connector working properly with the non-SSL host from 
 Apache
  
   
   What I want to do: 
   
   Have any requests for apps running on Tomcat from any of the 4 
 virtual
   hosts
   to be redirected to the same Tomcat instance.  This is mainly for
   simplicity
   since I will be using Tomcat Realms for login to determine what to 
do
  for
   a
   user in the app based on role.  If I have to do 4 virtual hosts in
  Tomcat,
   then let me know :) 
   
   Is the correct way to make this work with JK to create 4 
 Connector
   instances at, say, ports 8009-8012 in my tomcat server.xml, then 
set 
 up
  4
   JK
   workers in workers.properties with each respective virtual host's
  domain
   name and redirection port?  Or is there some way to use a single
   connector?
   (I'm guessing NOT the latter due to the port probably being bound 
by
  the
   connector process) 
   
   Having said this and if my former idea is the correct way, for 
the 
 JK
   connector entry in my Tomcat server.xml, is the redirectPort
  arbitrarily
   chosen?  I have 8443 in for my single connector/site/host setup, 
 would
  I
   simply use 8443-8446? 
   
   Any input on this setup appreciated. 
   
   
   --
   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] 
   
  
  
  Hello Colin, i'm unsure about advising on this because i'm running the 

  non-threading apache 1.3.27. i have a very similar setup as u describe
  that 
  works 4 me: i have 4 virtual hosts running on the public wire plus a 
dns
 
 
  server. the virtual hosts 4 defined in apache only w/ all https 
 JDBCRealm 
  protected directories serving jsp and servlets redirected from apache 
on
 
 
  port 8443. all https cgi-bin is redirected through port 443. otherwise 

 all
  
  http is port 80 and 8080 for jsp/servlets. this config is pretty much 
  out-of-the-box w/o any undue config on the tc side except for the 
  JDBCRealm and a custom web.xml for each webapp both secure and 
 non-secure.
  
  only server.xml editing done was basically to uncomment the connectors 

 for
  
  port 8443 (ssl and non-ssl connectors). no extra stuff like Host 
tags 
 or
  
  anything like that to confuse the issue. hope this helps, david. 
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional

RE: JK and multiple virtual hosts on Apache (repost)

2002-12-09 Thread Madere, Colin
Any chance you can get the workers.properties file this person used for
configuring JK?

 -Original Message-
 From: Robert L Sowders [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 3:48 PM
 To:   Tomcat Users List
 Cc:   'Tomcat Users List'
 Subject:  RE: JK and multiple virtual hosts on Apache (repost)
 
 Perhaps this document can help you a little.
 
 rls
 
 
 
 
 
 Madere, Colin [EMAIL PROTECTED]
 12/09/2002 12:13 PM
 Please respond to Tomcat Users List
 
  
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 cc: 
 Subject:RE: JK and multiple virtual hosts on Apache
 (repost)
 
 
 Those all reference JK2, but I'm using JK (since it is suggested you use 
 JK
 in production environments due to stability... not to mention the likely
 build problems I'll experience on Solaris 7 ).  Going to hack away at this
 for a while and then try to compile JK2 again if all fails.
 
 And yes, I'm using IP-based Virtual Hosts on Apache.
 
 
  -Original Message-
  From:  Robert L Sowders [SMTP:[EMAIL PROTECTED]]
  Sent:  Monday, December 09, 2002 2:48 AM
  To:Tomcat Users List
  Subject:   RE: JK and multiple virtual hosts on Apache 
 (repost)
  
  This has come up quite often in the past.  Search the archives for 
  JkUriSet.  When using apache/modssl make sure you use IP based virtual 
  hosts.
  
  rls
  
  
  
  
  
  Madere, Colin [EMAIL PROTECTED]
  12/08/2002 08:00 PM
  Please respond to Tomcat Users List
  
  
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  cc: 
  Subject:RE: JK and multiple virtual hosts on Apache
  (repost)
  
  
  Thanks for the input, but I don't want any port numbers in the URLs for 
 a
  number of reasons.  Hence my use of the JK connector (that and only 
  wanting
  to set up SSL through Apache and not Tomcat).
  
  I'm quite surprised no one else on this list has a setup similar to what
 
 
  I'm
  doing
  
   -Original Message-
   From:  David Brown [SMTP:[EMAIL PROTECTED]]
   Sent:  Friday, December 06, 2002 7:48 PM
   To:'Tomcat Users List'
   Subject:   Re: JK and multiple virtual hosts on Apache 
  (repost)
   
   Madere, Colin writes: 
   
I might have had some list trouble so I'm reposting this (since I 
 got 
  no
responses so far). 

-Original Message-
From:   Madere, Colin [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, December 05, 2002 5:55 PM
To: '[EMAIL PROTECTED]'
Subject:4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK 
  connectors? 

Before I go off into JK configuration craziness, I thought I'd post
 
 
  my
situation and see what rises to the top. 

What I have: 

1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL)
1 Tomcat 4.12 (no virtual hosts as of yet)
1 JK 1.2.0 connector working properly with the non-SSL host from 
  Apache
   

What I want to do: 

Have any requests for apps running on Tomcat from any of the 4 
  virtual
hosts
to be redirected to the same Tomcat instance.  This is mainly for
simplicity
since I will be using Tomcat Realms for login to determine what to 
 do
   for
a
user in the app based on role.  If I have to do 4 virtual hosts in
   Tomcat,
then let me know :) 

Is the correct way to make this work with JK to create 4 
  Connector
instances at, say, ports 8009-8012 in my tomcat server.xml, then 
 set 
  up
   4
JK
workers in workers.properties with each respective virtual host's
   domain
name and redirection port?  Or is there some way to use a single
connector?
(I'm guessing NOT the latter due to the port probably being bound 
 by
   the
connector process) 

Having said this and if my former idea is the correct way, for 
 the 
  JK
connector entry in my Tomcat server.xml, is the redirectPort
   arbitrarily
chosen?  I have 8443 in for my single connector/site/host setup, 
  would
   I
simply use 8443-8446? 

Any input on this setup appreciated. 


--
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] 

   
   
   Hello Colin, i'm unsure about advising on this because i'm running the
 
 
   non-threading apache 1.3.27. i have a very similar setup as u describe
   that 
   works 4 me: i have 4 virtual hosts running on the public wire plus a 
 dns
  
  
   server. the virtual hosts 4 defined in apache only w/ all https 
  JDBCRealm 
   protected directories serving jsp and servlets redirected from apache 
 on
  
  
   port 8443. all https cgi-bin is redirected through port 443. otherwise
 
 
  all
   
   http is port 80 and 8080

RE: JK and multiple virtual hosts on Apache (repost)

2002-12-09 Thread Robert L Sowders
When multiple hosting you usually auto-generate the file.  John turners 
web site has instructions on how to do this.
http://www.johnturner.com/howto/apache1-tomcat404-howto.html
See step 3.

rls





Madere, Colin [EMAIL PROTECTED]
12/09/2002 02:04 PM
Please respond to Tomcat Users List

 
To: 'Tomcat Users List' [EMAIL PROTECTED]
cc: 
Subject:RE: JK and multiple virtual hosts on Apache (repost)


Any chance you can get the workers.properties file this person used for
configuring JK?

 -Original Message-
 From:  Robert L Sowders [SMTP:[EMAIL PROTECTED]]
 Sent:  Monday, December 09, 2002 3:48 PM
 To:Tomcat Users List
 Cc:'Tomcat Users List'
 Subject:   RE: JK and multiple virtual hosts on Apache 
(repost)
 
 Perhaps this document can help you a little.
 
 rls
 
 
 
 
 
 Madere, Colin [EMAIL PROTECTED]
 12/09/2002 12:13 PM
 Please respond to Tomcat Users List
 
 
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 cc: 
 Subject:RE: JK and multiple virtual hosts on Apache
 (repost)
 
 
 Those all reference JK2, but I'm using JK (since it is suggested you use 

 JK
 in production environments due to stability... not to mention the likely
 build problems I'll experience on Solaris 7 ).  Going to hack away at 
this
 for a while and then try to compile JK2 again if all fails.
 
 And yes, I'm using IP-based Virtual Hosts on Apache.
 
 
  -Original Message-
  From:  Robert L Sowders [SMTP:[EMAIL PROTECTED]]
  Sent:  Monday, December 09, 2002 2:48 AM
  To:Tomcat Users List
  Subject:   RE: JK and multiple virtual hosts on Apache 
 (repost)
  
  This has come up quite often in the past.  Search the archives for 
  JkUriSet.  When using apache/modssl make sure you use IP based virtual 

  hosts.
  
  rls
  
  
  
  
  
  Madere, Colin [EMAIL PROTECTED]
  12/08/2002 08:00 PM
  Please respond to Tomcat Users List
  
  
  To: 'Tomcat Users List' [EMAIL PROTECTED]
  cc: 
  Subject:RE: JK and multiple virtual hosts on Apache
  (repost)
  
  
  Thanks for the input, but I don't want any port numbers in the URLs 
for 
 a
  number of reasons.  Hence my use of the JK connector (that and only 
  wanting
  to set up SSL through Apache and not Tomcat).
  
  I'm quite surprised no one else on this list has a setup similar to 
what
 
 
  I'm
  doing
  
   -Original Message-
   From:  David Brown [SMTP:[EMAIL PROTECTED]]
   Sent:  Friday, December 06, 2002 7:48 PM
   To:'Tomcat Users List'
   Subject:   Re: JK and multiple virtual hosts on Apache 
  (repost)
   
   Madere, Colin writes: 
   
I might have had some list trouble so I'm reposting this (since I 
 got 
  no
responses so far). 

-Original Message-
From:   Madere, Colin [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, December 05, 2002 5:55 PM
To: '[EMAIL PROTECTED]'
Subject:4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK 
  connectors? 

Before I go off into JK configuration craziness, I thought I'd 
post
 
 
  my
situation and see what rises to the top. 

What I have: 

1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL)
1 Tomcat 4.12 (no virtual hosts as of yet)
1 JK 1.2.0 connector working properly with the non-SSL host from 
  Apache
   

What I want to do: 

Have any requests for apps running on Tomcat from any of the 4 
  virtual
hosts
to be redirected to the same Tomcat instance.  This is mainly for
simplicity
since I will be using Tomcat Realms for login to determine what 
to 
 do
   for
a
user in the app based on role.  If I have to do 4 virtual hosts 
in
   Tomcat,
then let me know :) 

Is the correct way to make this work with JK to create 4 
  Connector
instances at, say, ports 8009-8012 in my tomcat server.xml, then 
 set 
  up
   4
JK
workers in workers.properties with each respective virtual 
host's
   domain
name and redirection port?  Or is there some way to use a single
connector?
(I'm guessing NOT the latter due to the port probably being bound 

 by
   the
connector process) 

Having said this and if my former idea is the correct way, for 
 the 
  JK
connector entry in my Tomcat server.xml, is the redirectPort
   arbitrarily
chosen?  I have 8443 in for my single connector/site/host setup, 
  would
   I
simply use 8443-8446? 

Any input on this setup appreciated. 


--
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] 

   
   
   Hello Colin, i'm unsure about

RE: JK and multiple virtual hosts on Apache (repost)

2002-12-08 Thread Madere, Colin
Thanks for the input, but I don't want any port numbers in the URLs for a
number of reasons.  Hence my use of the JK connector (that and only wanting
to set up SSL through Apache and not Tomcat).

I'm quite surprised no one else on this list has a setup similar to what I'm
doing

 -Original Message-
 From: David Brown [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, December 06, 2002 7:48 PM
 To:   'Tomcat Users List'
 Subject:  Re: JK and multiple virtual hosts on Apache (repost)
 
 Madere, Colin writes: 
 
  I might have had some list trouble so I'm reposting this (since I got no
  responses so far). 
  
  -Original Message-
  From:  Madere, Colin [SMTP:[EMAIL PROTECTED]]
  Sent:  Thursday, December 05, 2002 5:55 PM
  To:'[EMAIL PROTECTED]'
  Subject:   4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK connectors? 
  
  Before I go off into JK configuration craziness, I thought I'd post my
  situation and see what rises to the top. 
  
  What I have: 
  
  1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL)
  1 Tomcat 4.12 (no virtual hosts as of yet)
  1 JK 1.2.0 connector working properly with the non-SSL host from Apache
 
  
  What I want to do: 
  
  Have any requests for apps running on Tomcat from any of the 4 virtual
  hosts
  to be redirected to the same Tomcat instance.  This is mainly for
  simplicity
  since I will be using Tomcat Realms for login to determine what to do
 for
  a
  user in the app based on role.  If I have to do 4 virtual hosts in
 Tomcat,
  then let me know :) 
  
  Is the correct way to make this work with JK to create 4 Connector
  instances at, say, ports 8009-8012 in my tomcat server.xml, then set up
 4
  JK
  workers in workers.properties with each respective virtual host's
 domain
  name and redirection port?  Or is there some way to use a single
  connector?
  (I'm guessing NOT the latter due to the port probably being bound by
 the
  connector process) 
  
  Having said this and if my former idea is the correct way, for the JK
  connector entry in my Tomcat server.xml, is the redirectPort
 arbitrarily
  chosen?  I have 8443 in for my single connector/site/host setup, would
 I
  simply use 8443-8446? 
  
  Any input on this setup appreciated. 
  
  
  --
  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] 
  
  
 
 Hello Colin, i'm unsure about advising on this because i'm running the 
 non-threading apache 1.3.27. i have a very similar setup as u describe
 that 
 works 4 me: i have 4 virtual hosts running on the public wire plus a dns 
 server. the virtual hosts 4 defined in apache only w/ all https JDBCRealm 
 protected directories serving jsp and servlets redirected from apache on 
 port 8443. all https cgi-bin is redirected through port 443. otherwise all
 
 http is port 80 and 8080 for jsp/servlets. this config is pretty much 
 out-of-the-box w/o any undue config on the tc side except for the 
 JDBCRealm and a custom web.xml for each webapp both secure and non-secure.
 
 only server.xml editing done was basically to uncomment the connectors for
 
 port 8443 (ssl and non-ssl connectors). no extra stuff like Host tags or
 
 anything like that to confuse the issue. hope this helps, david. 
 
 
 --
 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]




JK and multiple virtual hosts on Apache (repost)

2002-12-06 Thread Madere, Colin
I might have had some list trouble so I'm reposting this (since I got no
responses so far).

 -Original Message-
 From: Madere, Colin [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, December 05, 2002 5:55 PM
 To:   '[EMAIL PROTECTED]'
 Subject:  4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK connectors?
 
 Before I go off into JK configuration craziness, I thought I'd post my
 situation and see what rises to the top.
 
 What I have:
 
 1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL)
 1 Tomcat 4.12 (no virtual hosts as of yet)
 1 JK 1.2.0 connector working properly with the non-SSL host from Apache
 
 What I want to do:
 
 Have any requests for apps running on Tomcat from any of the 4 virtual
 hosts
 to be redirected to the same Tomcat instance.  This is mainly for
 simplicity
 since I will be using Tomcat Realms for login to determine what to do for
 a
 user in the app based on role.  If I have to do 4 virtual hosts in Tomcat,
 then let me know :)
 
 Is the correct way to make this work with JK to create 4 Connector
 instances at, say, ports 8009-8012 in my tomcat server.xml, then set up 4
 JK
 workers in workers.properties with each respective virtual host's domain
 name and redirection port?  Or is there some way to use a single
 connector?
 (I'm guessing NOT the latter due to the port probably being bound by the
 connector process)
 
 Having said this and if my former idea is the correct way, for the JK
 connector entry in my Tomcat server.xml, is the redirectPort arbitrarily
 chosen?  I have 8443 in for my single connector/site/host setup, would I
 simply use 8443-8446?
 
 Any input on this setup appreciated.
 
 
 --
 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: JK and multiple virtual hosts on Apache (repost)

2002-12-06 Thread David Brown
Madere, Colin writes: 

I might have had some list trouble so I'm reposting this (since I got no
responses so far). 

-Original Message-
From:	Madere, Colin [SMTP:[EMAIL PROTECTED]]
Sent:	Thursday, December 05, 2002 5:55 PM
To:	'[EMAIL PROTECTED]'
Subject:	4 Apache2 VirtualHosts + 1 Tomcat4 = ? JK connectors? 

Before I go off into JK configuration craziness, I thought I'd post my
situation and see what rises to the top. 

What I have: 

1 Apache 2.0.43 with 4 virutal hosts (3 w/ SSL)
1 Tomcat 4.12 (no virtual hosts as of yet)
1 JK 1.2.0 connector working properly with the non-SSL host from Apache 

What I want to do: 

Have any requests for apps running on Tomcat from any of the 4 virtual
hosts
to be redirected to the same Tomcat instance.  This is mainly for
simplicity
since I will be using Tomcat Realms for login to determine what to do for
a
user in the app based on role.  If I have to do 4 virtual hosts in Tomcat,
then let me know :) 

Is the correct way to make this work with JK to create 4 Connector
instances at, say, ports 8009-8012 in my tomcat server.xml, then set up 4
JK
workers in workers.properties with each respective virtual host's domain
name and redirection port?  Or is there some way to use a single
connector?
(I'm guessing NOT the latter due to the port probably being bound by the
connector process) 

Having said this and if my former idea is the correct way, for the JK
connector entry in my Tomcat server.xml, is the redirectPort arbitrarily
chosen?  I have 8443 in for my single connector/site/host setup, would I
simply use 8443-8446? 

Any input on this setup appreciated. 


--
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] 



Hello Colin, i'm unsure about advising on this because i'm running the 
non-threading apache 1.3.27. i have a very similar setup as u describe that 
works 4 me: i have 4 virtual hosts running on the public wire plus a dns 
server. the virtual hosts 4 defined in apache only w/ all https JDBCRealm 
protected directories serving jsp and servlets redirected from apache on 
port 8443. all https cgi-bin is redirected through port 443. otherwise all 
http is port 80 and 8080 for jsp/servlets. this config is pretty much 
out-of-the-box w/o any undue config on the tc side except for the 
JDBCRealm and a custom web.xml for each webapp both secure and non-secure. 
only server.xml editing done was basically to uncomment the connectors for 
port 8443 (ssl and non-ssl connectors). no extra stuff like Host tags or 
anything like that to confuse the issue. hope this helps, david. 


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



Re: Virtual hosts with Apache 2.0.43 Tomcat 4.1.12 mod_jk2 on Linux

2002-10-31 Thread Tomcat Newbie
OK, just figured it out. Duh! I just had to add [uri:www.mydomain.tld/*]
entry in addition to an existing [uri:mydomain.tld/*]. Now it works. :-)

Ed

- Original Message -
From: Tomcat Newbie [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 9:27 PM
Subject: Virtual hosts with Apache 2.0.43  Tomcat 4.1.12  mod_jk2 on Linux


 I can't seem to figure out why my setup behaves differently when I access
 the same host with and without 'www.'. I used to run Apache 1.3.x and
Tomcat
 4.0.x, where my setup included aliases in Apache config file as well as
two
 virtual hosts in Tomcat (with 'www.' and without) for each domain. Not
sure
 if that was the way to do it, but it worked!

 My present setup, aside from upgraded software, has Aliases both in Apache
 and Tomcat config files, however such setup does not seem to help. Apache
 handles requests properly and forwards them to the same directory, however
 with 'www.' I get a directory listing, while without Tomcat picks up the
 request and processes it.

 What am I missing? Or do I have to setup two hosts for each domain again?

 Thanks,

 Ed


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Virtual hosts with Apache 2.0.43 Tomcat 4.1.12 mod_jk2 on Linux

2002-10-30 Thread Tomcat Newbie
I can't seem to figure out why my setup behaves differently when I access
the same host with and without 'www.'. I used to run Apache 1.3.x and Tomcat
4.0.x, where my setup included aliases in Apache config file as well as two
virtual hosts in Tomcat (with 'www.' and without) for each domain. Not sure
if that was the way to do it, but it worked!

My present setup, aside from upgraded software, has Aliases both in Apache
and Tomcat config files, however such setup does not seem to help. Apache
handles requests properly and forwards them to the same directory, however
with 'www.' I get a directory listing, while without Tomcat picks up the
request and processes it.

What am I missing? Or do I have to setup two hosts for each domain again?

Thanks,

Ed


--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




virtual hosts in Apache and Tomcat conf files

2002-10-02 Thread David Mossakowski

What is the difference between specifying VirtualHost in apache conf 
file vs. Host element in Tomcat server.xml file?

Does this depend on the connector used?  Would using Host elements in 
server.xml remove dependency on what connector is used?

Thanks,
d.

-- 
David Mossakowski  [EMAIL PROTECTED]
Instinet Corporation 212.310.7275



***
Disclaimer

This message is intended only for the use of the Addressee and 
may contain information that is PRIVILEGED and/or
CONFIDENTIAL or both.

This email is intended only for the personal and confidential use
of the recipient(s) named above.

If the reader of this email is not an intended recipient, you have
received this email in error and any review, dissemination,
distribution or copying is strictly prohibited.

If you have received this email in error, please notify the sender
immediately by return mail and permanently deleting the copy
you received.

Thank you.

***


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




Re: Virtual Hosts: Connecting Apache 2.x to Tomcat 4.x (was mod_jk, WindowsXP, Tomcat 4.0.5 - issues)

2002-09-26 Thread Robert L Sowders

It depends on your situation.  With just a few VirtualHosts it's easier to 
have the client domains aliased to your interface.

Here's a nice article that was posted here a couple of months ago.






Matt Raible [EMAIL PROTECTED]
09/25/2002 08:29 PM
Please respond to Tomcat Users List

 
To: 'Tomcat Users List' [EMAIL PROTECTED]
cc: 
Subject:Virtual Hosts: Connecting Apache 2.x to Tomcat 4.x (was 
mod_jk, Windows 
XP, Tomcat 4.0.5 - issues)

Sweet - I got it all working - now for a new question.

What is the recommended setup for an ISP/ASP with one box?  The article
I modified my workers.properties after (http://www.ubeans.com/tomcat/)
seems to be geared for load-balancing rather than an ISP/ASP
situation.  So I added the following and it seemed to achieve what I
wanted.

VirtualHost 192.168.0.3:80
ServerName localhost
JkMount /*.jsp tomcat1
JkMount /servlet/* tomcat1
/VirtualHost

# Second Virtual Host. Also accessible via HTTPS
#
VirtualHost 192.168.0.3:80
ServerName fatbastard
JkMount /*.jsp tomcat2
JkMount /servlet/* tomcat2
/VirtualHost

Where requests to http://localhost will go to tomcat 1 and
http://fatbastard will go to tomcat 2.  So if I now have to configure
this on one Linux server for approx 5 (initially) different tomcat
instances. 

So do you recommend setting up a bunch of customer1.mycompany.com
aliases that go to the same IP, or stuffing a bunch of NIC cards into
the one box?

Thanks for all your help - this stuff is great, and folks on this list
have made it very easy to setup.

Matt



 -Original Message-
 From: Robert L Sowders [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, September 25, 2002 6:25 PM
 To: Tomcat Users List
 Subject: Re: mod_jk, Windows XP, Tomcat 4.0.5 - issues
 
 
 No, you should stay with 2.0.42.  You need the dll from the 
 Jakarta build 
 web site, it has been built against 2.0.42.  The one you 
 downloaded has 
 not been up-graded yet to work with 2.0.42 yet.
 
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2
 /nightly/win32/
 
 rls
 
 
 
 
 Matt Raible [EMAIL PROTECTED]
 09/25/2002 05:10 PM
 Please respond to Tomcat Users List
 
 
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 cc: 
 Subject:mod_jk, Windows XP, Tomcat 4.0.5 - issues
 
 I'm trying to use one of the mod_jk.dll downloads at 
http://www.acg-gmbh.de/mod_jk/ and having no luck.  The errors I'm
getting is:

1. The Apache service named  reported the following error:
 Apache.exe: module
C:\jakarta-tomcat-connectors-4.0.4-src\jk\native\apache-2.0\mod_jk.c
is not compatible with this version of Apache (found 20020628, need
20020903). .

2. The Apache service named  reported the following error:
 Please contact the vendor for the correct version. .

I have the following in http.conf

# Using mod_jk.dll to redirect dynamic calls to Tomcat LoadModule
jk_module modules/mod_jk.dll

#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info

And I've downloaded http://www.acg-gmbh.de/mod_jk/Release/mod_jk.dll.

My configuration is Windows XP SP1, Apache 2.0.42, Tomcat 4.0.5.

Looks like I need Apache 2.0.40 eh?

Thanks,

Matt



--
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]





Web Hosting with Tomcat 4 and Apache

Overview


There are a number of configuration issues and security concerns
which must be addressed when setting up Apache and Tomcat 4 for
virtual hosting of customer sites in a web hosting environment.

The major conerns are:

1.  Delegating to untrusted customers maintenance of their applications
without compromising server security.

2.  Configuring Apache and Tomcat for virtual hosting.

3.  Surviving poorly written web applications installed by
customers.  This includes fault tolerance and identifying
which customer's web application is causing problems.

4.  Mimimize the amount of hand holding or config changes the
apache and tomcat system administrators have to make.

This is written based on my experiences setting up this type
of hosting environment on Sun Solaris hardware.  Some of this
will be specific to Solaris, but in general should work for
almost any flavor of Unix.

Unix accounts and groups


The user tomcat was created for running tomcat, it should
be created similar to the nobody account used for running
Apache.  The tomcat user is assigned to the group tomcat.
The tomcat user is a member of group user.

The group tomcat was created as the group the user tomcat
is assigned to.

The group user was created, this is the group customer
ftp accounts are assigned to.  The tomcat account is a
member of this group so that both customers and tomcat
can write files

Re: Virtual Hosts: Connecting Apache 2.x to Tomcat 4.x (was mod_jk, WindowsXP, Tomcat 4.0.5 - issues)

2002-09-26 Thread Robert L Sowders

Also don't forget that with Apache2 you have access to mod_vhost_alias and 
mod_vhost_aliasIP which can simplify things greatly.  Examples are in the 
Apache documentation that is installed with Apache 2.0.42
http://localhost/manual/mod/mod_vhost_alias.html
http://localhost/manual/vhosts/mass.html
See also
http://localhost/manual/vhosts/name-based.html

rls





Matt Raible [EMAIL PROTECTED]
09/25/2002 08:29 PM
Please respond to Tomcat Users List

 
To: 'Tomcat Users List' [EMAIL PROTECTED]
cc: 
Subject:Virtual Hosts: Connecting Apache 2.x to Tomcat 4.x (was 
mod_jk, Windows 
XP, Tomcat 4.0.5 - issues)

Sweet - I got it all working - now for a new question.

What is the recommended setup for an ISP/ASP with one box?  The article
I modified my workers.properties after (http://www.ubeans.com/tomcat/)
seems to be geared for load-balancing rather than an ISP/ASP
situation.  So I added the following and it seemed to achieve what I
wanted.

VirtualHost 192.168.0.3:80
ServerName localhost
JkMount /*.jsp tomcat1
JkMount /servlet/* tomcat1
/VirtualHost

# Second Virtual Host. Also accessible via HTTPS
#
VirtualHost 192.168.0.3:80
ServerName fatbastard
JkMount /*.jsp tomcat2
JkMount /servlet/* tomcat2
/VirtualHost

Where requests to http://localhost will go to tomcat 1 and
http://fatbastard will go to tomcat 2.  So if I now have to configure
this on one Linux server for approx 5 (initially) different tomcat
instances. 

So do you recommend setting up a bunch of customer1.mycompany.com
aliases that go to the same IP, or stuffing a bunch of NIC cards into
the one box?

Thanks for all your help - this stuff is great, and folks on this list
have made it very easy to setup.

Matt



 -Original Message-
 From: Robert L Sowders [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, September 25, 2002 6:25 PM
 To: Tomcat Users List
 Subject: Re: mod_jk, Windows XP, Tomcat 4.0.5 - issues
 
 
 No, you should stay with 2.0.42.  You need the dll from the 
 Jakarta build 
 web site, it has been built against 2.0.42.  The one you 
 downloaded has 
 not been up-graded yet to work with 2.0.42 yet.
 
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2
 /nightly/win32/
 
 rls
 
 
 
 
 Matt Raible [EMAIL PROTECTED]
 09/25/2002 05:10 PM
 Please respond to Tomcat Users List
 
 
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 cc: 
 Subject:mod_jk, Windows XP, Tomcat 4.0.5 - issues
 
 I'm trying to use one of the mod_jk.dll downloads at 
http://www.acg-gmbh.de/mod_jk/ and having no luck.  The errors I'm
getting is:

1. The Apache service named  reported the following error:
 Apache.exe: module
C:\jakarta-tomcat-connectors-4.0.4-src\jk\native\apache-2.0\mod_jk.c
is not compatible with this version of Apache (found 20020628, need
20020903). .

2. The Apache service named  reported the following error:
 Please contact the vendor for the correct version. .

I have the following in http.conf

# Using mod_jk.dll to redirect dynamic calls to Tomcat LoadModule
jk_module modules/mod_jk.dll

#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info

And I've downloaded http://www.acg-gmbh.de/mod_jk/Release/mod_jk.dll.

My configuration is Windows XP SP1, Apache 2.0.42, Tomcat 4.0.5.

Looks like I need Apache 2.0.40 eh?

Thanks,

Matt



--
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]




Virtual Hosts: Connecting Apache 2.x to Tomcat 4.x (was mod_jk, Windows XP, Tomcat 4.0.5 - issues)

2002-09-25 Thread Matt Raible

Sweet - I got it all working - now for a new question.

What is the recommended setup for an ISP/ASP with one box?  The article
I modified my workers.properties after (http://www.ubeans.com/tomcat/)
seems to be geared for load-balancing rather than an ISP/ASP
situation.  So I added the following and it seemed to achieve what I
wanted.

VirtualHost 192.168.0.3:80
ServerName localhost
JkMount /*.jsp tomcat1
JkMount /servlet/* tomcat1
/VirtualHost

# Second Virtual Host. Also accessible via HTTPS
#
VirtualHost 192.168.0.3:80
ServerName fatbastard
JkMount /*.jsp tomcat2
JkMount /servlet/* tomcat2
/VirtualHost

Where requests to http://localhost will go to tomcat 1 and
http://fatbastard will go to tomcat 2.  So if I now have to configure
this on one Linux server for approx 5 (initially) different tomcat
instances. 

So do you recommend setting up a bunch of customer1.mycompany.com
aliases that go to the same IP, or stuffing a bunch of NIC cards into
the one box?

Thanks for all your help - this stuff is great, and folks on this list
have made it very easy to setup.

Matt



 -Original Message-
 From: Robert L Sowders [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, September 25, 2002 6:25 PM
 To: Tomcat Users List
 Subject: Re: mod_jk, Windows XP, Tomcat 4.0.5 - issues
 
 
 No, you should stay with 2.0.42.  You need the dll from the 
 Jakarta build 
 web site, it has been built against 2.0.42.  The one you 
 downloaded has 
 not been up-graded yet to work with 2.0.42 yet.
 
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2
 /nightly/win32/
 
 rls
 
 
 
 
 Matt Raible [EMAIL PROTECTED]
 09/25/2002 05:10 PM
 Please respond to Tomcat Users List
 
  
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 cc: 
 Subject:mod_jk, Windows XP, Tomcat 4.0.5 - issues
 
 I'm trying to use one of the mod_jk.dll downloads at 
http://www.acg-gmbh.de/mod_jk/ and having no luck.  The errors I'm
getting is:

1. The Apache service named  reported the following error:
 Apache.exe: module
C:\jakarta-tomcat-connectors-4.0.4-src\jk\native\apache-2.0\mod_jk.c
is not compatible with this version of Apache (found 20020628, need
20020903). .

2. The Apache service named  reported the following error:
 Please contact the vendor for the correct version. .

I have the following in http.conf

# Using mod_jk.dll to redirect dynamic calls to Tomcat LoadModule
jk_module modules/mod_jk.dll

#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info

And I've downloaded http://www.acg-gmbh.de/mod_jk/Release/mod_jk.dll.

My configuration is Windows XP SP1, Apache 2.0.42, Tomcat 4.0.5.

Looks like I need Apache 2.0.40 eh?

Thanks,

Matt



--
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]




Virtual hosts using Apache 2.0.40, Tomcat 4.1.10 and mod_jk2

2002-09-17 Thread Short, Dave

Can anyone please provide a working configuration for Apache 2.0.40 virtual
hosts with Tomcat 4.1.10 (running in-process) and mod_jk2?

Defining a virtual host in Apache, redirecting to Tomcat (via
workers.properties), defining a virtual host and context in the server.xml
file isn't working somehow.  The examples example works just fine when
defined without a virtual host in Apache.  When defined as a virtual host,
Tomcat seems unable to find Java classes and import files.  No errors are
written anywhere (that I can find) and the jsp executes ok, but any Java
classes are not called.  If I run the date example form a non virtual host
Apache, everything works.  When running the same example with an Apache
virtual host set up, the date jsp is executed but the date class it calls is
not invoked.  The date example boiler plate text is displayed without
values.

Any help would be greatly appreciated.

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




Re: Virtual hosts using Apache 2.0.40, Tomcat 4.1.10 and mod_jk2

2002-09-17 Thread Dom

Hi

I'm having the same trouble using Apache 2.0.40, Tomcat 4.1.10 and mod_jk2
with virtual hosts

It works without problem without v.h., but the only doc I've found about
mod_jk2 doesn't talk about v.h.(
http://www.apache.org/~jfclere/jk2_docs/configweb.html)

Maybe mod_jk2 isn't ready for v.h ?

(I don't have any trouble with the same configuration but mod_jk instead of
mod_jk2)

Dom

- Original Message -
From: Short, Dave [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 7:30 PM
Subject: Virtual hosts using Apache 2.0.40, Tomcat 4.1.10 and mod_jk2


 Can anyone please provide a working configuration for Apache 2.0.40
virtual
 hosts with Tomcat 4.1.10 (running in-process) and mod_jk2?

 Defining a virtual host in Apache, redirecting to Tomcat (via
 workers.properties), defining a virtual host and context in the server.xml
 file isn't working somehow.  The examples example works just fine when
 defined without a virtual host in Apache.  When defined as a virtual host,
 Tomcat seems unable to find Java classes and import files.  No errors are
 written anywhere (that I can find) and the jsp executes ok, but any Java
 classes are not called.  If I run the date example form a non virtual host
 Apache, everything works.  When running the same example with an Apache
 virtual host set up, the date jsp is executed but the date class it calls
is
 not invoked.  The date example boiler plate text is displayed without
 values.

 Any help would be greatly appreciated.

 --
 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: Virtual hosts using Apache 2.0.40, Tomcat 4.1.10 and mod_jk2

2002-09-17 Thread Turner, John


For reference, the official URL is here:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/configweb.html

It's the same page, but just in case the other one gets moved out of a user
dir, the official version would be the one above.

John


 -Original Message-
 From: Dom [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 17, 2002 4:16 PM
 To: Tomcat Users List
 Subject: Re: Virtual hosts using Apache 2.0.40, Tomcat 4.1.10 and
 mod_jk2
 
 
 Hi
 
 I'm having the same trouble using Apache 2.0.40, Tomcat 
 4.1.10 and mod_jk2
 with virtual hosts
 
 It works without problem without v.h., but the only doc I've 
 found about
 mod_jk2 doesn't talk about v.h.(
 http://www.apache.org/~jfclere/jk2_docs/configweb.html)
 
 Maybe mod_jk2 isn't ready for v.h ?
 
 (I don't have any trouble with the same configuration but 
 mod_jk instead of
 mod_jk2)
 
 Dom

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




virtual hosts and apache

2002-09-05 Thread Dionisio Ruiz de Zarate

I know how i must to configure the virtual hosts in apache but in the
tomcat server.xml i don't know.

1.- can any body send me one sample?
2.- in the apache httpd.conf file, in the virtual host  description i have
the normal virtual host description but for the interaction with tomcat,
must i add some lines? which lines are these?(for the integration with
tomcat)

i am running in one linux platform (SuSE 8).
thanks




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




Re: virtual hosts and apache

2002-09-05 Thread Branko Kannenberg

Hi there !

Which connectro are you using? If it's mod_jk, you can use the autoconf 
feature, so you don't have to worry about the virtual host configuration in 
httpd.conf.

Just add

Include path to tomcat/conf/auto/mod_jk.conf

to httpd.conf and something like

  Listener className=org.apache.ajp.tomcat4.config.ApacheConfig 
jkDebug=info modJk=/opt/apache2/modules/mod_jk.so /

to the Server section of your server.xml file and something like

 Listener className=org.apache.ajp.tomcat4.config.ApacheConfig 
append=true forwardAll=true noRoot=false jkDebug=info /

to the Host section of your server.xml file

You probably have to adjust the parameters for the Listener directive, for a 
description of the parameters have a look at

http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html

It's for tomcat 3.3, but I am using 4.0.4 and it's still useful.

Now, everytime you start tomcat, the file
path to tomcat/conf/auto/mod_jk.conf
will be created and includes the neccessary configuration for apache

Ciao,   Branko.




Am Donnerstag, 5. September 2002 08:16 schrieb Dionisio Ruiz de Zarate:
 I know how i must to configure the virtual hosts in apache but in the
 tomcat server.xml i don't know.

 1.- can any body send me one sample?
 2.- in the apache httpd.conf file, in the virtual host  description i have
 the normal virtual host description but for the interaction with tomcat,
 must i add some lines? which lines are these?(for the integration with
 tomcat)

 i am running in one linux platform (SuSE 8).
 thanks



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




Re: virtual hosts and apache

2002-09-05 Thread Dionisio Ruiz de Zarate

I am using tomcat 4.0.2 or 1. web_apps

can you help me?
thanks

Branko Kannenberg
 Hi there !

 Which connectro are you using? If it's mod_jk, you can use the autoconf
 feature, so you don't have to worry about the virtual host configuration
 in  httpd.conf.

 Just add

 Include path to tomcat/conf/auto/mod_jk.conf

 to httpd.conf and something like

   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 jkDebug=info modJk=/opt/apache2/modules/mod_jk.so /

 to the Server section of your server.xml file and something like

  Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=true forwardAll=true noRoot=false jkDebug=info /

 to the Host section of your server.xml file

 You probably have to adjust the parameters for the Listener directive,
 for a  description of the parameters have a look at

 http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html

 It's for tomcat 3.3, but I am using 4.0.4 and it's still useful.

 Now, everytime you start tomcat, the file
 path to tomcat/conf/auto/mod_jk.conf
 will be created and includes the neccessary configuration for apache

 Ciao, Branko.




 Am Donnerstag, 5. September 2002 08:16 schrieb Dionisio Ruiz de Zarate:
 I know how i must to configure the virtual hosts in apache but in the
 tomcat server.xml i don't know.

 1.- can any body send me one sample?
 2.- in the apache httpd.conf file, in the virtual host  description i
 have the normal virtual host description but for the interaction with
 tomcat, must i add some lines? which lines are these?(for the
 integration with tomcat)

 i am running in one linux platform (SuSE 8).
 thanks



 --
 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: virtual hosts and apache

2002-09-05 Thread Branko Kannenberg

Hi there !

I'm sorry, I have no knowledge about the webapp connector.
You could switch to the mod_jk connector, it has advantages like load 
balancing and serving only dynamic content. But you have to compile it for 
yourself to get a version which works which the apache version you have.
The compiling is a bit tricky but can be done. There are numerous mails in 
this list about compiling the connector package. Two very helpful howtos can 
be found at
http://www.pubbitch.org/jboss/mod_jk2.html
and
http://www.johnturner.com/howto/apache-tomcat-howto.html

Ciao,   Branko.




Am Donnerstag, 5. September 2002 11:00 schrieb Dionisio Ruiz de Zarate:
 I am using tomcat 4.0.2 or 1. web_apps

 can you help me?
 thanks

 Branko Kannenberg

  Hi there !
 
  Which connectro are you using? If it's mod_jk, you can use the autoconf
  feature, so you don't have to worry about the virtual host configuration
  in  httpd.conf.
 
  Just add
 
  Include path to tomcat/conf/auto/mod_jk.conf
 
  to httpd.conf and something like
 
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
  jkDebug=info modJk=/opt/apache2/modules/mod_jk.so /
 
  to the Server section of your server.xml file and something like
 
   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
  append=true forwardAll=true noRoot=false jkDebug=info /
 
  to the Host section of your server.xml file
 
  You probably have to adjust the parameters for the Listener directive,
  for a  description of the parameters have a look at
 
  http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html
 
  It's for tomcat 3.3, but I am using 4.0.4 and it's still useful.
 
  Now, everytime you start tomcat, the file
  path to tomcat/conf/auto/mod_jk.conf
  will be created and includes the neccessary configuration for apache
 
  Ciao,   Branko.
 
  Am Donnerstag, 5. September 2002 08:16 schrieb Dionisio Ruiz de Zarate:
  I know how i must to configure the virtual hosts in apache but in the
  tomcat server.xml i don't know.
 
  1.- can any body send me one sample?
  2.- in the apache httpd.conf file, in the virtual host  description i
  have the normal virtual host description but for the interaction with
  tomcat, must i add some lines? which lines are these?(for the
  integration with tomcat)
 
  i am running in one linux platform (SuSE 8).
  thanks
 
  --
  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: virtual hosts and apache

2002-09-05 Thread Turner, John


Hosts are configured in the Host element of server.xml.

For demonstration purposes, the Host element with the name localhost in
server.xml is a virtual host.  Copy all of that, and change the name
parameter in the Host element to match Apache's VirtualHost.

John


 -Original Message-
 From: Dionisio Ruiz de Zarate [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 05, 2002 2:16 AM
 To: [EMAIL PROTECTED]
 Subject: virtual hosts and apache
 
 
 I know how i must to configure the virtual hosts in apache but in the
 tomcat server.xml i don't know.
 
 1.- can any body send me one sample?
 2.- in the apache httpd.conf file, in the virtual host  
 description i have
 the normal virtual host description but for the interaction 
 with tomcat,
 must i add some lines? which lines are these?(for the integration with
 tomcat)
 
 i am running in one linux platform (SuSE 8).
 thanks
 
 
 
 
 --
 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: virtual hosts and apache

2002-09-05 Thread Dionisio Ruiz de Zarate

apache and tomcat 4.0.1, web_apps

can you help me?
thanks




- Original Message -
From: Branko Kannenberg [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 05, 2002 11:55 AM
Subject: Re: virtual hosts and apache


 Hi there !

 Which connectro are you using? If it's mod_jk, you can use the autoconf
 feature, so you don't have to worry about the virtual host configuration
in
 httpd.conf.

 Just add

 Include path to tomcat/conf/auto/mod_jk.conf

 to httpd.conf and something like

   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 jkDebug=info modJk=/opt/apache2/modules/mod_jk.so /

 to the Server section of your server.xml file and something like

  Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
 append=true forwardAll=true noRoot=false jkDebug=info /

 to the Host section of your server.xml file

 You probably have to adjust the parameters for the Listener directive,
for a
 description of the parameters have a look at

 http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html

 It's for tomcat 3.3, but I am using 4.0.4 and it's still useful.

 Now, everytime you start tomcat, the file
 path to tomcat/conf/auto/mod_jk.conf
 will be created and includes the neccessary configuration for apache

 Ciao, Branko.




 Am Donnerstag, 5. September 2002 08:16 schrieb Dionisio Ruiz de Zarate:
  I know how i must to configure the virtual hosts in apache but in the
  tomcat server.xml i don't know.
 
  1.- can any body send me one sample?
  2.- in the apache httpd.conf file, in the virtual host  description i
have
  the normal virtual host description but for the interaction with tomcat,
  must i add some lines? which lines are these?(for the integration with
  tomcat)
 
  i am running in one linux platform (SuSE 8).
  thanks



 --
 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]