Administer proxy actions - WebSphere proxy server
Create new proxy actions or we can administer an existing proxy action. A proxy server action is an event performed when an HTTP request or an HTTP response is received by a proxy virtual host. Some examples of proxy server actions include caching actions, rewriting actions, compression actions, header modification actions, and routing actions.
A proxy action cannot be performed unless it is associated with a proxy rule expression. A proxy rule expression is only evaluated when it is associated with a proxy virtual host. A proxy action can be created or administered without a proxy rule expression or a proxy virtual host, but it cannot be used without them.
Proxy actions are associated with proxy rule expressions. If a proxy rule expression evaluates to true, then all of the proxy actions specified in the proxy rule expression configuration are performed. Complete these steps to create a new proxy action or to administer an existing proxy action for the proxy server.
Tasks
- From the administrative console, select...
Servers > Server Types > WebSphere proxy servers > proxy_server > Proxy actions
- Optional: Manage an existing proxy action configuration.
- To view or modify the settings for an existing proxy action, click proxy_action_name
If we have made changes to the proxy action configuration, click OK to save the changes.
- To remove an existing proxy action that has been selected, click Delete
- To create a caching proxy action, click New Caching Action.
- Enter the name of the proxy action in the Action name field.
The Action name is used as the unique identifier for this proxy action configuration. The Action name must be unique with the cell and cannot include any of the following characters: # \ /, : ; " * ? < > | = + & % '.
- To enable caching, select the Enable caching check box
- Enter the value in seconds for the Default expiration field. The Default expiration field specifies the amount of time, in seconds, before a cached response expires.
- Enter the value in seconds for the Last modified factor. The Last modified factor field specifies the amount of time before a response is cached if the response does not have explicit HTTP expiration headers.
- Click OK to save the proxy action configuration.
- To create a compression action, then click New HTTP Request Compression Action to create an action for requests, or click New HTTP Response Compression Action to create an action for responses.
- Enter the name of the proxy action in the Action name field. The Action name is used as the unique identifier for this proxy action configuration. The Action name must be unique with the cell and cannot include any of the following characters: # \ /, : ; " * ? < > | = + & % '.
- Select the appropriate compression type from the Compression type menu.
- Select the content type for which compression should occur. We can select multiple content types to be compressed. Click New to add a new content type to the list. To remove a content type from the list, then select the content type to be removed, then click Delete.
- Click OK to save the proxy action configuration.
- To create a header action, click New HTTP Request Header Action to create an action for requests, or click New HTTP Response Header Action to create an action for responses.
- Enter the name of the proxy action in the Action name field. The Action name is used as the unique identifier for this proxy action configuration. The Action name must be unique with the cell and cannot include any of the following characters: # \ /, : ; " * ? < > | = + & % '.
- Enter the name of the HTTP header to be modified in the Header name field.
- Select the appropriate action from the Header modify action menu. The available header modify actions include:
- Set
- Append
- Edit
- Remove
- Enter the value to be used for the Header modify action in the Header value field.
- Enter an expression to be performed on the header value in the Header value expression field. The Header value expression is evaluated and the modify action is performed if the evaluation returned a match.
- If we are creating a HTTP Request Header action, then select the appropriate methods for the Header modify action being performed. We can select multiple methods. Click New to add a new method to the list. To remove a method from the list, then select the method to be removed and click Delete.
- If we are creating a HTTP Response Header action, then select the appropriate status codes for the Header modify action being performed. We can selected multiple status codes to be included. Click New to add a new status code to the list. To remove a status code from the list, select the status code to be removed and click Delete.
- Click OK to save the proxy action configuration.
- To create a rewriting action proxy action, then click New Rewriting Action.
- Enter the name of the proxy action in the Action name field. The Action name is used as the unique identifier for this proxy action configuration. The Action name must be unique with the cell and cannot include any of the following characters: # \ /, : ; " * ? < > | = + & % '.
- Select the type of rewriting action to be performed in the Rewriting action types menu. The follow elements can be rewritten using this type of proxy action:
- Absolute URL response
- Redirect location header
- Redirect status code
- Relative URL response
- Set cookie domain
- Set cookie path
- Enter the subject URL pattern to be rewritten in the From pattern field.
- Enter the resulting URL pattern after the rewrite has occurred in the To pattern field.
- Optional: Select Enable passive rewrite to defer the rewriting of the URI until the subsequent request for that URI is sent by the client.
- Optional: In the Cookie name field, enter the name of the cookie for which the domain or the path are to be rewritten. This field is only valid for the Set-Cookie type of rewriting actions.
- Optional: In the Limit URL pattern field, specify a constraint on the URL patterns to rewrite in the response message. Limiting the URL pattern prevents the proxy server from rewriting all URL patterns in the response message of a certain page. This field is only valid for the absolute URL response action type or the relative URL response action type.
- Optional: In the Limit Cookie domain field, specify a constraint to limit the rewriting of the cookie domain to only a set of specified domains. If no domains are specified, then all domains are rewritten. This field is only valid for the Set-Cookie type of rewriting action.
- Optional: In the Limit Cookie path field, specify a constraint to limit the rewriting of the cookie path to only a set of specified paths. If no paths are specified, then all the paths are rewritten. This field is only valid for the Set-Cookie type of rewriting action.
- Click OK to save the proxy action configuration.
- To create a routing proxy action, then click one of the following: New Application Server Route, New Generic Server Cluster Route, New Fail Route, New Redirect Route, or New Local Route.
- Enter the name of the proxy action in the Action name field. The Action name is used as the unique identifier for this proxy action configuration. The Action name must be unique with the cell and cannot include any of the following characters: # \ /, : ; " * ? < > | = + & % '.
- For a new application server route, then follow these additional steps:
- Enter the beginning time for this routing rule in the Start time field. If the start time is specified using a 12-hour clock, then click AM or PM. If the start time is specified using a 24-hour clock, then click 24-hour.
- Enter the finishing time for this routing rule in the End time field. If the end time is specified using a 12-hour clock, then click AM or PM. If the end time is specified using a 24-hour clock, then click 24-hour.
- Select Include or Exclude from the Action menu to specify the type of rule being configured.
- Select the applications servers that will follow this rule from the Available application servers menu.
- Click >.
- To remove an application server from the Enabled application servers menu, then select that server from the Enabled application servers menu and click <.
- For a new generic server cluster route, then follow these additional steps:
- Select the Generic server cluster that will follow this rule from the Generic server cluster name menu.
- Select either Active Affinity or Passive Affinity for the affinity type.
- If we selected Active Affinity, then in the Default expiration field, enter the expiration time in seconds.
- If we selected Passive Affinity, then in the Cookie name field, enter the name of the cookie to be used by the proxy server to manage affinity.
- If we selected Passive Affinity, then select the generic server mappings for which this cookie will be used to manage affinity. If create any additional mappings, click New. If we need to remove existing cookie mappings, select the appropriate mapping and click Delete.
- Click New Time Mapping.
- Enter the beginning time for this routing rule in the Start time field. If this rule should be applied all the time, then selected 24-hour.
- Enter the finishing time for this routing rule in the End time field. If this rule should be applied all the time, then selected 24-hour.
- Select Include or Exclude from the Action menu to specify the type of rule being configured.
- Select the cluster members that will follow this rule from the Available generic server cluster members menu.
- Click >.
- To remove cluster member from the Enabled generic server cluster members menu, then selected that cluster member from the Enabled generic server cluster members menu and click <.
- Click OK to return to set the time-of-day rules and continue creating your generic server cluster route configuration.
- If we are creating a failure route, follow this additional step: In the Fail status code field, Eenter the status code that must be used to indicate a request was not successful.
- If we are creating a redirection route, follow this additional step: In the Redirect URL field, enter the URL that must be used to redirect the inbound request.
- If we are creating a local route, follow this additional step: Confirm that the static file document root is correct. If the value listed is not the document root that we want, click Edit. See Administer proxy virtual hosts for more information on changing the static file document root.
- Click OK to finish creating your proxy action rule.
Subtopics
- Proxy server actions
Proxy server actions are used in association with proxy rule expressions. If a proxy rule expression evaluates to true, then all the proxy actions associated with the rule expression are performed. Some examples of proxy server actions include caching actions, rewriting actions, compression actions, header modification actions, and routing actions.- Proxy actions collection
Administer actions for the proxy server. Proxy actions include creating, modifying, or deleting rules that affect caching, compression, headers, rewriting, and routing for the proxy server. The Proxy actions collection panel allows configuration of proxy actions from one interface.- Caching action settings
Configure caching action settings for a proxy server. Caching actions are set to determine whether a response is cached. A caching action specifies the last modified factor and the default expiration to define how a response is cached.- HTTP compression action settings
Configure settings for an HTTP request compression action or an HTTP response compression action for a proxy server. Compression actions are set to compress the request message to the server or response message to the client.- HTTP header action settings
Configure settings for an HTTP request header action or an HTTP response header action for a proxy server. Use header modification actions to add, modify, or delete request and response headers.- Rewrite action settings
Configure settings to implement a rewrite action for outbound responses handled by the proxy server. Rewriting actions define how the proxy server rewrites elements of the uniform resource locators, such as URLs in an HTML page or the redirect link in the response. Rewrite actions are often done to mask the back-end server identity with that of the proxy server.- Route action settings
Configure settings for a route action for a proxy server. Add a route action to define routes to local file system resources for static file serving.- Generic server cluster route action settings
Configure a generic server cluster route action for a proxy server. Add a generic server cluster route action to define routes for inbound requests to specific generic server clusters.- Time mapping settings
Configure time mapping settings for the proxy server that set routing rules to be in effect during specific time intervals. These settings can be specified for application server members or for generic server cluster members.