Użytkownik Steve napisał:
I have a requirement to make some Tomcat pages available through an
AOLServer host. I would like to do this by mapping a part of the url
space on the AOLserver to Tomcat. e.g

http://foo.bar.com/some/page/index.html goes to /some/page/index.html on
the AOLServer

but

http://foo.bar.com/some/other/page/index.html goes to
http://foo.bar.com:8080/page/index.html which is Tomcat.

In other words anything below /some/other goes to the tomcat server on
port 8080 using AOLS as a reverse proxy otherwise the request is handled
by AOLS. I believe this can be done with virtual hosting but I can't
find any examples of how to set it up. If its possible could someone
give me a few pointers. If there is a better way knowledge of that would
also be appreciated.

You can do this with non-standard ns_register_proxy command which exposes functionality already existing in nsvhr module. Try my patched nsvh2 from:

http://www.zjednoczenie.com/upload/aolserver/nsvhr2.tgz

When you compile and load nsvhr2.so you should put into library *.tcl
file something like this:

# note that your page  /some/other/page/index.html will be served
# from http://foo.bar.com:8080/some/other/page/index.html
# not  http://foo.bar.com:8080/page/index.html

foreach method [list GET HEAD POST] {
    ns_register_proxy $method /some/other/page/index.html \
                  http://foo.bar.com:8080
}

ns_register_proxy syntax is the same as ns_register_proc

I you want even more stuff like this, serach for my posts to the list.
Some time ago I had sent to the list a proposal to add such
functionality to AOLserver core (along with my single server virtual
host extention patch and test cases), but it was ignored by a core team.

Recently I've put nsvhr in production enviroment and there are problems
with pages served from proxied Apache. I've never seen any problem with
proxing AOLserver though. So be carefull, because I'm not sure if nsvhr
is really well tested module. Maybe you should use Apache with its
ProxyPass directive as frontend server and AOLserver as backend or even
something like squid or ?ponds? which was also discussed on this list.

--tkosiak


-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to