Sun Java System Web Server 7.0 Update 2 Administrator's Guide

Customizing Reverse Proxy

To configure conditional request processing you need to manually edit the virtual server specific obj.conf file.

For example, if you want to configure reverse proxy for all .jsp, .php requests. You need to include the following text in your obj.conf file.


<If $uri =~ '.jsp$' or $uri =~ '.php$'> 
NameTrans fn="map" from="/" to="http:/" name="custom_reverse_proxy"
</If>

Note –

You should insert the above text under the object name default.Add the following text to the end of the obj.conf file.


<Object name ="custom_reverse_proxy">
Route fn="set-origin-server" server="http://<hostname>:<port>"
</Object>

<Object name ppath="http:*"
Service fn="proxy-retrieve" method="*"
</Object>