WebAppDeply and UseCanonicalNames

2002-03-18 Thread Brent Johnson

Tomcat Version:  4.0.x (not sure which exact release - I think its
4.0.2)

I've got a pretty serious problem right now that I'm having trouble
fixing.  I've got a production website running and I need to change the
header of the pages on the website depending on the hostname in the URL.

I've got UseCanonicalNames set to off for the default, and for each
virtual host.  Lets say I've got this...
VirtualHost 192.168.1.20
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /home/www/docs/development/blah.com
UseCanonicalName Off
ServerName doh.blah.com
ServerAlias homer homer.blah.com

RewriteEngine on
RewriteRule ^.*\.xsl$ / [R]

WebAppDeploy pctidev conn /

ErrorLog logs/homer-error_log
CustomLog logs/homer-access_log common
Directory /home/www/docs/development/blah.com
Options All
AllowOverride All
Order allow,deny
Allow from all
/Directory
/VirtualHost

I'm using Cocoon1 along with Tomcat (but I dont think it has anything to
do with Cocoon).  If I try to go to the following URL with these
settings:
http://homer.blah.com/index.xml

It works fine that way - BUT - if I try going to the following (keep in
mind I have index.xml set as one of my DirectoryIndex settings):
http://homer.blah.com/

It changes the URL to be http://doh.blah.com/index.xml

If I comment out the WebAppDeploy in the VirtualHost and just stick in
an index.html file in the same directory and try the same thing it works
fine.  It's almost as though Tomcat is the one doing the redirection
(and it doesnt make any difference if its a .xml file or .jsp - same
thing happens).  I have both domains specified in my server.xml like the
following:

  Host name=homer.blah.com debug=0 appBase=webapps
unpackWARs=true
Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=homer_access_log.
suffix=.txt
 pattern=common/
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=homer_log. suffix=.txt
timestamp=true/
Context path= docBase=/home/www/docs/development/blah.com
debug=0 reload=true/
  /Host

The exact same thing is copied after this and the name= is changed to
name=doh.blah.com.

Can ANYONE please give me a little help

Thanks,

- Brent


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: WebAppDeply and UseCanonicalNames

2002-03-18 Thread Brent Johnson

Thanks for the reply - this seems like a pretty nasty bug in mod_webapp
doesn't it?  Unless you're like Microsoft, then we could always
just call it a feature :)

I'll try hacking at mod_webapp and see if I can get that to work (unless
you could be so generous enough to pass on the code you're currently
testing so I could take a look - if it's not company confidential or
anything you can send it directly to me).

Thanks for the help!

- Brent

-Original Message-
From: James Williamson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 10:27 AM
To: Tomcat Users List
Subject: Re: WebAppDeply and UseCanonicalNames


Hi Brent,

We had the same problem, if you actually look at the source code of
mod_webapp
(and you're familiar with Apache internals) you'll notice two things.

1) During Apache's rewrite handling stage which mod_webapp (wam_match)
wants
to take
part in it returns OK, this tells Apache that the rewriting stage is
over so
mod_rewrite is essentially
ignored. Since mod_webapp is generally the first handler (as you've
often
LoadModule(d) it) to take
part in this stage this is the behaviour you'll get.

2) Even if you tell wam_match in mod_webapp to return DECLINED which
lets
mod_rewrite take part
it doesn't make any difference. mod_webapp only looks at the raw uri,
during
the rewrite stage only the
filename is alterered.

What this basically means is with the current mod_webapp code you can
forget
all about rewriting. And then I'll start going on
about the 302 issue.

The solution:
hack mod_webapp or do something which we implemented, which is
essentially
moving over to using the
filename, something we have on our development machine which we've been
testing recently.

Regards,

James Williamson
www.nameonthe.net

- Original Message -
From: Brent Johnson [EMAIL PROTECTED]
To: Tomcat-User (E-mail) [EMAIL PROTECTED]
Sent: Monday, March 18, 2002 3:09 PM
Subject: WebAppDeply and UseCanonicalNames


 Tomcat Version:  4.0.x (not sure which exact release - I think its
 4.0.2)

 I've got a pretty serious problem right now that I'm having trouble
 fixing.  I've got a production website running and I need to change
the
 header of the pages on the website depending on the hostname in the
URL.

 I've got UseCanonicalNames set to off for the default, and for each
 virtual host.  Lets say I've got this...
 VirtualHost 192.168.1.20
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /home/www/docs/development/blah.com
 UseCanonicalName Off
 ServerName doh.blah.com
 ServerAlias homer homer.blah.com

 RewriteEngine on
 RewriteRule ^.*\.xsl$ / [R]

 WebAppDeploy pctidev conn /

 ErrorLog logs/homer-error_log
 CustomLog logs/homer-access_log common
 Directory /home/www/docs/development/blah.com
 Options All
 AllowOverride All
 Order allow,deny
 Allow from all
 /Directory
 /VirtualHost

 I'm using Cocoon1 along with Tomcat (but I dont think it has anything
to
 do with Cocoon).  If I try to go to the following URL with these
 settings:
 http://homer.blah.com/index.xml

 It works fine that way - BUT - if I try going to the following (keep
in
 mind I have index.xml set as one of my DirectoryIndex settings):
 http://homer.blah.com/

 It changes the URL to be http://doh.blah.com/index.xml

 If I comment out the WebAppDeploy in the VirtualHost and just stick in
 an index.html file in the same directory and try the same thing it
works
 fine.  It's almost as though Tomcat is the one doing the redirection
 (and it doesnt make any difference if its a .xml file or .jsp - same
 thing happens).  I have both domains specified in my server.xml like
the
 following:

   Host name=homer.blah.com debug=0 appBase=webapps
 unpackWARs=true
 Valve className=org.apache.catalina.valves.AccessLogValve
  directory=logs  prefix=homer_access_log.
 suffix=.txt
  pattern=common/
 Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=homer_log. suffix=.txt
 timestamp=true/
 Context path= docBase=/home/www/docs/development/blah.com
 debug=0 reload=true/
   /Host

 The exact same thing is copied after this and the name= is changed
to
 name=doh.blah.com.

 Can ANYONE please give me a little help

 Thanks,

 - Brent


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




WebAppDeply and UseCanonicalNames

2002-03-14 Thread Brent Johnson

Tomcat Version:  4.0.x (not sure which exact release - I think its
4.0.2)

I've got a pretty serious problem right now that I'm having trouble
fixing.  I've got a production website running and I need to change the
header of the pages on the website depending on the hostname in the URL.

I've got UseCanonicalNames set to off for the default, and for each
virtual host.  Lets say I've got this...
VirtualHost 192.168.1.20
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /home/www/docs/development/blah.com
UseCanonicalName Off
ServerName doh.blah.com
ServerAlias homer homer.blah.com

RewriteEngine on
RewriteRule ^.*\.xsl$ / [R]

WebAppDeploy pctidev conn /

ErrorLog logs/homer-error_log
CustomLog logs/homer-access_log common
Directory /home/www/docs/development/blah.com
Options All
AllowOverride All
Order allow,deny
Allow from all
/Directory
/VirtualHost

I'm using Cocoon1 along with Tomcat (but I dont think it has anything to
do with Cocoon).  If I try to go to the following URL with these
settings:
http://homer.blah.com/index.xml

It works fine that way - BUT - if I try going to the following (keep in
mind I have index.xml set as one of my DirectoryIndex settings):
http://homer.blah.com/

It changes the URL to be http://doh.blah.com/index.xml

If I comment out the WebAppDeploy in the VirtualHost and just stick in
an index.html file in the same directory and try the same thing it works
fine.  It's almost as though Tomcat is the one doing the redirection
(and it doesnt make any difference if its a .xml file or .jsp - same
thing happens).  I have both domains specified in my server.xml like the
following:

  Host name=homer.blah.com debug=0 appBase=webapps
unpackWARs=true
Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=homer_access_log.
suffix=.txt
 pattern=common/
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=homer_log. suffix=.txt
timestamp=true/
Context path= docBase=/home/www/docs/development/blah.com
debug=0 reload=true/
  /Host

The exact same thing is copied after this and the name= is changed to
name=doh.blah.com.

Can ANYONE please give me a little help

Thanks,

- Brent

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat vs Apache and Errors

2002-01-08 Thread Brent Johnson

I just upgraded from Tomcat 3.2.x to 4.0.  I'm using it with Apache
1.3.19 and the webapp module to connect.  I've noticed something very
odd though...
 
It seems as though Tomcat is handling all the errors?  Any error I get
is output by Tomcat itself (a 404 error, a 500 error, etc).  In Tomcat
3.2.x when an error occurred that error message was output by Apache
(not the fancy blue Apache Tomcat screen).  It almost seems as though
Tomcat is handling the output of pages and errors itself??  I assume
this behavior does NOT mean Tomcat is serving images and html pages
right?  I want Apache to handle all files EXCEPT for JSP and XML (using
Cocoon 1.8.2) files.
 
(and I realize I can use the error-page tag in the web.xml file to have
it redirect to a file - that's ok in production but I don't want that to
be done in development)
 
Any insight on this would be very helpful... thanks!
 
- Brent

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Multiple WEB-INF

2001-10-04 Thread Brent Johnson

I saw some posts in the mailing list archives about this but haven't
really found the solution.

I've got a development location and a staging location where I keep
all my JSP files (and XML using Cocoon).  I've then got virtual host
entries for both sites.  The problem is, I'd like to separate the
WEB-INF/classes for both (right now I've got the staging WEB-INF in my
CLASSPATH so any imports inside JSP come from that directory).

Ideally, I'd like to have both WEB-INF directories be separate, the
class com.whatever.MyClass comes from the dev class file in
development, and staging class file in staging.  I've got both vhosts
running just fine (by adding to the server.xml directory and such).
That's all running great.

(I'm using Tomcat 3.2.3 - also, should I go ahead and upgrade to 3.3???)

Thanks,

- Brent



Worker Classpath

2000-12-07 Thread brent . johnson

Does anyone know of a way to override the classpath for a single AJP13
worker?  I'd like to have a worker (or set of load-balanced workers) set
aside which has a classpath set to point at a location where the java files
will not be changed (a "staging" type of environment - com.mycomp.temp for
example) - but have another http server on another port which sends
requests to another set of workers whose classpath points to another java
"development" directory which will constantly be changing (also
com.mycomp.temp but from a different unix directory).

I realize I could just copy tomcat and change the ports and it would do the
same thing - but if possible I'd like to use the workers and run only one
tomcat instance.

Thanks,

- Brent




Re: Solaris binary for mod_jk.so

2000-11-30 Thread brent . johnson


Why should they worry about compiling that for you?  I just installed 3.2 a
little while ago and I had no problems.  If you'd just take a look at the
mod_jk documentation it gives you the EXACT command you need to run under
Solaris to get mod_jk.so to compile.  If you still can't get it to work
though, email me directly and I'll attach and send you a copy of my
mod_jk.so file.

- Brent



   

"Jonathan  

Eric Miller" To: "Tomcat User" 
[EMAIL PROTECTED]
jemiller@uch    cc: (bcc: Brent Johnson/HPC)  

icago.edu   Subject: Solaris binary for mod_jk.so 

   

11/30/00   

01:23 PM   

Please 

respond to 

tomcat-user

   

   




First off, I would like to congratulate the Tomcat developers for the
release of 3.2. You guys are doing a greate job and I look forward to using
it.

One thing that I think would be very helpful to users is if you could
provide binaries for mod_jk. I'm guessing it's just a matter of resources
and not having developers around that can make these binaries. From what I
remember, there used to be Solaris binaries awhile back. Then, Solaris
seemed to be dropped in favor of Linux. I just wanted to make a point that
there are probably still a lot of Solaris users out there that might
appreciate have a binary as well.

I'm going to try to build it right now. It's been a few months since I last
did this. At that time I found that the instructions had improved a bit
which I really appreciated. I had major problems building mod_jserv
previously, due to pretty much non-existent or incorrect documentation.

BTW, I'm hoping at some point to no longer have to use Apache Web Server at
all and instead just use Tomcat in stand-alone mode. However, there are a
few issues that I need to resolve first. One issue is that I want to limit
SSL connections to using 128-bit encryption and not 40-bit or 56-bit. I'm
not sure if this is possible with Tomcat.

Jon









Ajp13 Problems w Mod_JK

2000-11-16 Thread brent . johnson

These are a few problems/questions I'm having upgrading and using Tomcat
3.1 to 3.2 with Ajp13 instead of 12 (for SSL).

1) As for SSL security can apache handle the security and THEN pass off the
request to Tomcat? (the pass to tomcat would be internal behind a firewall)

2) I've noticed when starting up and shutting down Tomcat, the context
manager keeps mentioning /examples, /test and /admin although I've
commented these sections out in the server.xml file.  Is there some other
configuration location to remove these?

3) If I change my JkMount to point to /somethingElse/*  instead of
/servlet/* in mod_jk.conf (included in this message) the server no longer
processes the servlets.. not really sure why.  I'm guessing there's some
other file I havent changed..

4) If I bypass apache and use the Tomcat internal HTTP server it seems to
be processing requests fine.  But if I try to use apache to grab the
request and pass it to a load balancing worker it doesnt seem to work.
Here's a copy of my conf file:

LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c

JkWorkersFile /usr/local/jakarta/tomcat/conf/workers.properties
JkLogFile /usr/local/jakarta/tomcat/logs/mod_jk.log
JkLogLevel warn

JkMount /*.jsp lb1
JkMount /servlet/* lb1

Location "/servlet/WEB-INF/"
AllowOverride None
deny from all
/Location

Location "/servlet/META-INF/"
AllowOverride None
deny from all
/Location

I then have workers set up in the workers.properties like the following:

worker.list=lb1, ajp12, ajp13-10, ajp13-11

worker.lb1.port=4000
worker.lb1.host=localhost
worker.lb1.type=lb
worker.lb1.balanced_workers=ajp13-10, ajp13-11

worker.ajp12.port=4200
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
worker.ajp12.lbfactor=1

worker.ajp13-10.port=4201
worker.ajp13-10.host=localhost
worker.ajp13-10.type=ajp13
worker.ajp13-10.lbfactor=5

worker.ajp13-11.port=4202
worker.ajp13-11.host=localhost
worker.ajp13-11.type=ajp13
worker.ajp13-11.lbfactor=5

I've also changed the server.xml file to point the Ajp13ConnectionHandler
to port 4000 (the load balanced worker).  Any ideas as to why this isnt
working?  All that happens, is Apache issues me an internal server error
(real helpful).

Thanks for the help!

- Brent