Re: TomCat, Reverse Proxy Business Objects...

2007-05-23 Thread Gareth Eason
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Filip Hanik - Dev Lists wrote:
 proxyName is only for the Host name, which can also be accomplished by
 adding
 ProxyPreserveHost On
 in apache, and hence be able to support more than just one URL. So
 remove proxyName from the connector and added the above statement to
 your httpd config

Hi,

Thanks for your reply :)

ProxyPreserveHost On is in the httpd config, and it does preserve URL
rewrites where the URL is recognisable as such to Apache. The problem
occurs when the TomCat instance completely rewrites the URL by looking
at things like the hostname of the server it's running on and passing
that in as part of the data (e.g. a link embedded in a dynamically
generated web page.) It's these types of links that Apache cannot
possibly discover or rewrite.

 
 in terms of what you are doing, that's a bit more tricky.
 since you are doing URL rewriting, there is no way for Tomcat to know
 that it needs to prepend /customername/ to the URLs.
 
 do you have ProxyPassReverse in your httpd config? that should take care
 of Response headers, as for HTML itself,
 you need to probably create a valve or filter that adds the customer
 name into the HttpServletRequest methods through a wrapper

This sounds like exactly what I need to do. Can you point me in the
right direction regarding how I might do this? One TomCat instance will
always be for one customer, so the customername can be set as a global
parameter, in, e.g. the server.xml file.

I've partially worked around the problem by deploying apps in a
/webapps/customername/appname/foo  type directory structure under
TomCat, but that's a bit of a hack and I suspect there's an easier, more
graceful way. Is there?

Best regards,
--Gar


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFGVDmDK36C50PvIR8RAr+TAJ9aa6V3YKABcr1aZxGaki8E+i8CPgCfWufS
r/EQIxn1BrExyse1ix5csC4=
=5eU/
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TomCat, Reverse Proxy Business Objects...

2007-05-22 Thread Gareth Eason
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


   Hi,

I'm trying to get Business Objects working behind an Apache reverse
proxy server. The apache server takes care of converting to and from
HTTP -- HTTPS and provides a nice consistent URL for our clients.

From the outside world, https://www.url.com/customername/bo/foo is
mapped to http://appserver.vip.internal:port/bo/foo - which is all well
and good, except that TomCat on the appserver appears to generate its
own URLs which is passes out to the client instead of allowing the
reverse proxy layer to rewrite them.

I'm using proxyPort=443 and proxyName=www.url.com in two connector
port directives, which does rewrite the hostname correctly - but I
cannot seem to get it to add the customername part.

Is there another proxy* directive I'm missing? Adding
proxyName=www.url.com/customername doesn't appear to have an effect.

Currently, the first hit on the reverse proxy rewrites the URL
correctly and hits the TomCat server, but this sends back a response
which triggers a request to the reverse proxy written (incorrectly) as
https://www.url.com/bo/foo - which fails. (Notice that the customername
is missing.)

Any help or pointers in the right direction (or at the piece of
documentation that I've failed to grok) would be greatly appreciated.

Thanks in advance.

Best regards,
--Gar

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFGU0BRK36C50PvIR8RArAJAJ9NkfE4rgQpzNEpr4mZKAw5UzCSCgCZAdiO
0qqaPxhtnalORTA8OQZrtQI=
=wlEN
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TomCat, Reverse Proxy Business Objects...

2007-05-22 Thread Filip Hanik - Dev Lists
proxyName is only for the Host name, which can also be accomplished by 
adding

ProxyPreserveHost On

in apache, and hence be able to support more than just one URL. So 
remove proxyName from the connector and added the above statement to 
your httpd config


in terms of what you are doing, that's a bit more tricky.
since you are doing URL rewriting, there is no way for Tomcat to know 
that it needs to prepend /customername/ to the URLs.


do you have ProxyPassReverse in your httpd config? that should take care 
of Response headers, as for HTML itself,
you need to probably create a valve or filter that adds the customer 
name into the HttpServletRequest methods through a wrapper


Filip

Gareth Eason wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


   Hi,

I'm trying to get Business Objects working behind an Apache reverse
proxy server. The apache server takes care of converting to and from
HTTP -- HTTPS and provides a nice consistent URL for our clients.

From the outside world, https://www.url.com/customername/bo/foo is
mapped to http://appserver.vip.internal:port/bo/foo - which is all well
and good, except that TomCat on the appserver appears to generate its
own URLs which is passes out to the client instead of allowing the
reverse proxy layer to rewrite them.

I'm using proxyPort=443 and proxyName=www.url.com in two connector
port directives, which does rewrite the hostname correctly - but I
cannot seem to get it to add the customername part.

Is there another proxy* directive I'm missing? Adding
proxyName=www.url.com/customername doesn't appear to have an effect.

Currently, the first hit on the reverse proxy rewrites the URL
correctly and hits the TomCat server, but this sends back a response
which triggers a request to the reverse proxy written (incorrectly) as
https://www.url.com/bo/foo - which fails. (Notice that the customername
is missing.)

Any help or pointers in the right direction (or at the piece of
documentation that I've failed to grok) would be greatly appreciated.

Thanks in advance.

Best regards,
--Gar

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFGU0BRK36C50PvIR8RArAJAJ9NkfE4rgQpzNEpr4mZKAw5UzCSCgCZAdiO
0qqaPxhtnalORTA8OQZrtQI=
=wlEN
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]