This configuration will proxy the URI “/example” if it does not exist locally. A local copy of “/example” is preferred to a remote copy:
<Object name="default">
# Assign the URI "/example" (and any more specific URIs;
# /example/foo.html, /example/qwe.jsp, etc) the object name
# "server.example.com"
NameTrans fn="assign-name"
from="/example(|/*)"
name="server.example.com"
...
</Object>
# Execute these instructions for any resource with the assigned name
# "server.example.com"
<Object name="server.example.com">
# Check to see if a local copy of the requested resource exists. Only
# proxy the request if there is not a local copy.
ObjectType fn="check-passthrough"
type="magnus-internal/passthrough"
# Proxy the requested resource to the URL
# "http://server.example.com:8080" only if the "type" has been set to
# "magnus-internal-passthrough"
Service type="magnus-internal/passthrough"
fn="service-passthrough"
servers="http://server.example.com:8080"
</Object>
|