Sun Java System Web Proxy Server 4.0.3 2006Q2 Configuration File Reference

The Object Tag

Directives in the obj.conf file are grouped into objects that begin with an <Object> tag and end with an </Object> tag. The default object provides instructions to the server about how to process requests by default. Each new object modifies the default object’s behavior.

An Object tag may have a name attribute or a ppath attribute. Either parameter may be a wildcard pattern. For example:

<Object name="cgi">

- or -

<Object ppath="/usr/sun/proxyserver40/proxyserver1/docs/private/*">

The server always starts handling a request by processing the directives in the default object. However, the server switches to processing directives in another object after the NameTrans stage of the default object if either of the following conditions is true:

When the server has been alerted to use an object other than the default object, it processes the directives in the other object before processing the directives in the default object. For some steps in the process, the server stops processing directives in that particular stage (such as the Service stage) as soon as one is successfully executed, whereas for other stages the server processes all directives in that stage, including the ones in the default object as well as those in the additional object. For more details, see Flow of Control in obj.conf

Objects that Use the name Attribute

If a NameTrans directive in the default object specifies a name argument, the server switches to processing the directives in the object of that name before processing the remaining directives in the default object.

For example, the following NameTrans directive in the default object assigns the name big to any request whose URL starts with http://server_name/big/:


<Object name="big">
NameTrans fn="regexp-map" from="http://server/.*bigfile.dat" to="http://bigserver/bigfile.dat" name="big"
...
</Object>

            

When that NameTrans directive is executed, the server starts processing directives in the object named big:


<Object name="big">

               more directives...</Object>

            

Objects that Use the ppath Attribute

When the server finishes processing the NameTrans directives in the default object, the logical URL of the request will be transformed into the final URL that the proxy will use. If this final URL matches the ppath attribute of an object, the server switches to processing the directives in that object before processing the remaining ones in the default object.

For example, the following NameTrans directive translates the http://server_name/ part of the requested URL to <Install_Root>/<Instance_Directory>/docs (which is the document root directory):


<Object name="default">
NameTrans fn="map" from="<http://myfiles/myuser/" to= "ftp://myftpserver/myuser/"
...
</Object>

            

The URL http://myfiles/myuser/ would be translated to ftp://myftpserver/myuser/. However, suppose that obj.conf contains the following additional object:


<Object ppath="ftp://">

               more directives...</Object>

            

In this case, the URL matches ftp:// after the NameTrans and so starts processing the directives in the above object..