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

Using Web Server as Reverse Proxy in Graphical Interface

ProcedureTo Configure Reverse Proxy in Graphical Interface

  1. Login to Administration Console

  2. Select the configuration from the list

  3. Click the Edit Virtual Server button

  4. Click the Content Handling tab

  5. Click the Reverse Proxy sub tab

  6. Click the New button

    A new window appears.

  7. In URI enter (/) if you want all the requests to be set revers proxy. Else, enter the URI to be set to reverse proxy.

  8. Enter the server's URL, which you want to reverse proxy.

    For example, http://<content server-hostname>:port

  9. Click the OK button

  10. Click the Deployment Pending link in the top right of the screen.

  11. Click the Deploy button

    Deployment successful message appears.

  12. Click the Configuration tab

  13. Start the instance.

    Access the URI, which you configured as the reverse proxy.

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>