+

Search Tips   |   Advanced Search

Administer proxy actions


We can create new proxy actions or we can administer an existing proxy action. A proxy server action is an event that is performed when an HTTP request or an HTTP response is received by the 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.

 

  1. From the admin console, select Servers > Server Types > WebSphere proxy servers > proxy_server_name > Proxy actions.

  2. Manage an existing proxy action configuration.

    1. Click proxy_action_name to view or modify the settings for an existing proxy action. If we have made changes to the proxy action configuration, click OK to save the changes.

    2. Click Delete to remove an existing proxy action that has been selected.

  3. To create a caching proxy action, then click New Caching Action.

    1. 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: # \ / , : ; " * ? < > | = + & % '.

    2. Select the Enable caching check box to enable caching.

    3. 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.

    4. 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.

    5. Click OK to save the proxy action configuration.

  4. 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.

    1. 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: # \ / , : ; " * ? < > | = + & % '.

    2. Select the appropriate compression type from the Compression type menu.

    3. Select the context-types for which compression should occur.

      We can selected 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.

    4. Click OK to save the proxy action configuration.

  5. 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.

    1. 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: # \ / , : ; " * ? < > | = + & % '.

    2. Enter the name of the HTTP header to be modified in the Header name field.

    3. Select the appropriate action from the Header modify action menu. The available header modify actions include:

      • Set

      • Append

      • Edit

      • Remove

    4. Enter the value to be used for the Header modify action in the Header value field.

    5. 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.

    6. If 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.

    7. If 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.

    8. Click OK to save the proxy action configuration.

  6. To create a rewriting action proxy action, then click New Rewriting Action.

    1. 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: # \ / , : ; " * ? < > | = + & % '.

    2. 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

    3. Enter the subject URL pattern to be rewritten in the From pattern field.

    4. Enter the resulting URL pattern after the rewrite has occurred in the To pattern field.

    5. Select Enable passive rewrite to defer the rewriting of the URI until the subsequent request for that URI is sent by the client.

    6. 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.

    7. 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.

    8. 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.

    9. 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.

    10. Click OK to save the proxy action configuration.

  7. 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.

    1. 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: # \ / , : ; " * ? < > | = + & % '.

    2. If creating a new appserver route, then follow these additional steps:

      1. 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.

      2. 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.

      3. Select Include or Exclude from the Action menu to specify the type of rule being configured.

      4. Select the applications servers that will follow this rule from the Available appservers menu.

      5. Click >.

      6. To remove an appserver from the Enabled appservers menu, then select that server from the Enabled appservers menu and click <.

    3. If creating a new generic server cluster route, then follow these additional steps:

      1. Select the Generic server cluster that will follow this rule from the Generic server cluster name menu.

      2. Select either Active Affinity or Passive Affinity for the affinity type.

      3. If we selected Active Affinity, then in the Default expiration field, enter the expiration time in seconds.

      4. 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.

      5. If we selected Passive Affinity, then select the generic server mappings for which this cookie will be used to manage affinity. to create any additional mappings, click New. to remove existing cookie mappings, select the appropriate mapping and click Delete.

      6. Click New Time Mapping.

      7. 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.

      8. 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.

      9. Select Include or Exclude from the Action menu to specify the type of rule being configured.

      10. Select the cluster members that will follow this rule from the Available generic server cluster members menu.

      11. Click >.

      12. 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 <.

      13. Click OK to return to set the time-of-day rules and continue creating the generic server cluster route configuration.

    4. If 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.

    5. If 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.

    6. If creating a local route, follow this additional step: Confirm that the static file document root is correct. If the value that is listed is not the document root that you want, click Edit. See Administer proxy virtual hosts for more information on changing the static file document root.

  8. Click OK to finish creating the proxy action rule.


Proxy server actions
Proxy actions collection
Caching action settings
HTTP compression action settings
HTTP header action settings
Rewrite action settings
Route action settings
Generic server cluster route action settings
Time mapping settings

 

Related tasks


Set up the proxy server