iplanet /sunone and load balancer

We have multiple web server instances running on clustered web servers. The web server has a single ip address, so the web server instances are listening on ports 8080, 8081, 8082, ...

There is a load balancer that listens on port 80 and forwards request to the appropriate port on the individual web server servers.

virtual ip1:80 forwards request to webipserver1:8080

webipserver2:8080

virutal ip2:80 forwards request to webipserver1:8081

webipserver2:8081

The problem has developed where the web server instance needs to forward to another url that exists on the the same web server instance. The web server is appending the listen port (8080, 8081, ...) to the url. We would like the forward to keep port 80 as the default and not include the listen port.

Bad forward url: http://www.domain.com:8080/technology

Good forward url:http://www.domain.com/technology

How can we keep the web server from including the listen port?

Thanks

[1001 byte] By [ajay458] at [2007-11-26 10:46:35]
# 1
Could you post your obj.conf for the URL forwarding server?
wyb2005 at 2007-7-7 2:58:50 > top of Java-index,Web & Directory Servers,Web Servers...
# 2

I don't know what you're using as the load balancer, but this is a fairly typical problem that better load balancers can solve if they're doing protocol-level balancing (e.g. "reverse proxy" setup).

Since you're using Sun's web server, I'd suggest you try the reverse proxy plugin and its "rewrite-location" and "rewrite-host" options as documented here:

http://docs.sun.com/app/docs/doc/819-6510/6n8h5jos2?a=view

I've also seen J2EE webapps write the "backend" URL inside the body of an HTTP response (in addition to using it in Response headers like the Location header used in a 301/302 redirect). Appserver vendor's NSAPI web tier plugins often handle rewriting URLs inside message bodies automatically, but simpler, more generic reverse proxy server modules don't dare to touch the message body. We have a number of Sun 6.1 web frontends using Sun's reverse proxy plugin that also run a simple NSAPI Output filter we built to deal with rewriting URLs inside response headers and message bodies. If you're lucky, you won't have any problems with URLs inside message bodies. If you're not lucky, all you need is a wee bit of C skill to make Sun's sample code do the job:

http://docs.sun.com/source/817-6252/npgexmpl.html#wp998612

-Peter

PeterWatkins at 2007-7-7 2:58:50 > top of Java-index,Web & Directory Servers,Web Servers...
# 3

Alternatively, if you can't use Sun's Reverse Proxy Plugin to do your load balancing, you can configure Web Server to use a different port number in the self-referencing URLs it generates.

In Web Server 6.1, locate the servername attribute in server.xml and append a port number:servername="www.example.com:80"

In Web Server 7.0, locate the server-name element in server.xml and append a port number:<server-name>www.example.com:80</server-name>

elving at 2007-7-7 2:58:50 > top of Java-index,Web & Directory Servers,Web Servers...