Configure IIS7 as a proxy with weblogic server.

To configure the WLS proxy, first thing to do is to place the iisproxy.dll, iisforward.dll and iisproxy.ini in the root folder of the website.

 

In this example, I use the Default Website that is installed with IIS. So the above files are copied into its root directory, which is C:Inetpubwwwroot >  (NOTE, for a smooth working of the configuration, always copy the iisforward.dll and iisproxy.dll into the root directory of the WebSite. Otherwise, loading module, iisforward.dll will fail due to permission issues)

 

The iisproxy.ini has the following parameters:

 

WebLogicHost=<dns name or ip addgress>

WebLogicPort=<litening port for WLS>

WlForwardPath=/examplesWebApp

 

WlForward is the web application you want to proxy to in this example, If all web applications are to proxy to WebLogic Server just use WlForwardPath=/

 

Debug=ALL

Optional and used to collect debug information.  It is logged by default in c:TEMPwlproxy.log

DebugConfigInfo=ON

 

DebugConfigInfo is also is only used for debugging, the default is OFF.

Also note the WebLogicCluster=myweblogic.com:7001,yourweblogic.com:7001 line if you are using clusters.  This replaces the WebLogicHost and WeLogicPort entries.

 

(See  http://docs.oracle.com/cd/E23943_01/web.1111/e14395/plugin_params.htm for complete parameter list)

 

So just to get started all that needs to be in the issproxy.ini is the following when proxying is done by the Web Application name, if proxying exclusively by mime type (e.g.; .jsp) WlForwardPath does not need to be specified in the iisproxy.ini

 

NOTE: This is case sensitive

 

WebLogicHost=<dns name or ip address>

WebLogicPort=<listening port for WLS>

WlForwardPath=/examplesWebApp

 

 

This is a sample output from the directory/folder that the iisproxy.dll, iisforward.dll and iisproxy.ini is placed

 

Directory of C:inetpubwwwroot

 

10/02/2012  12:03 AM    <DIR>          .

10/02/2012  12:03 AM    <DIR>          ..

10/02/2012  12:06 AM           20,480 iisforward.dll

10/02/2012  12:06 AM          626,176 iisproxy.dll

10/02/2012  12:06 AM               182 iisproxy.ini

10/02/2012  12:09 AM               689 iisstart.htm

10/02/2012  12:09 AM               168 web.config

10/02/2012  12:09 AM           184,946 welcome.png

6 File(s)        832,641 bytes

2 Dir(s)  15,052,578,816 bytes free

And here is how it looks from IIS 7.0 (Default Web Site à content View)

Note: I am using the Default Web Site in this example.

 

If you do not have IIS 7.0 installed in your Windows Server 2008, follow the instructions in the below link to install IIS7.0

http://learn.iis.net/page.aspx/29/installing-iis7-on-windows-server-2008/

Now configure IIS 7.0

Before you configure IIS 7.0, make sure IIS 7.0 is installed with ISAPI Filters and ISAPI Extensions. If installed then Default Web Site à Features View should look like below:

 

 

 

 

 

If you do not see the ISAPI Filter icon in the Feature View, go to “Server Manager”, in thee left pane under Roles, click on Web Server (IIS)

Then click on “Add Role Services” on the Right pane.

Then check “ISAPI Filters” and “ISAPI Extensions” and click “Next” and then click on Install

 

 

Now go back to IIS 7.0 and click on Default WebSite as shown below:

Click on ISAPI filters icon in Features View.

In the right pane click on Add

Enter any name of your choice for filter name

Click browse (…) and selects iisforward.dll from C:/inetpub/wwwroot and then ok

 

 

 

 

Next go back to Default Web Site, click on “Handler Mappings”

 

Click on the ‘Add Script Map…’ on the right hand side menu options. Enter * for the Request path. Browse to the iisproxy.dll file and add it as the executable. Name it as  ‘proxy’.

 

 

Click on the Request Restrictions… button and uncheck the box titled ‘Invoke handler only if the request is mapped to’.

 

 

Click Ok to add this Handler mapping. Click ‘Yes’ on the Add Script Map dialog box.

 

Similarly, if you want to configure proxying by path click on Add Script Map and give the Request path as ‘.wlforward’ and select the executable as iisproxy.dll.

Click on the Request Restrictions… button and uncheck the box titled ‘Invoke handler only if the request is mapped to’.

Click Ok to add this Handler mapping. Click ‘Yes’ on the Add Script Map dialog box.

 

Click on the Root node of the IIS Manager tree and click on the ISAPI and CGI Restrictions.

 

Then click on “Edit Feature Settings” on the right hand side menu options

Check the ‘Allow unspecified ISAPI modules’ checkbox and click Ok

 

 

Restart IIS. Go to Default Web site and click on Restart on the right hand side menu.

 

Now access the Example web-application through IIS at http://localhost/examplesWebApp

 

 

 

 

 

 

6 comments

  1. Hi,

    I followed the above steps intact but i still get “This page can’t be displayed”.
    I have weblogic server on machine1 and i’m configuring IIS7 on machine2 which is going to be my webserver. I gave ‘machine1’ as WebLogicHost in iisproxy.ini and 7001 as port. but i still get the error.
    Can you tell me what can be going wrong.

    Thanks.

    1. Hi Pradeep,

      Will have to look at your setup.
      Share ur skype id if you still have issues..

      Thanks,
      Faisal

  2. Hi, Thanks for such a great work. I need some specific information for iisproxy.ini. Below are the details.

    1. The weblogic console port is 7001 and within I have my machine with port 7005 where I have deployed my app.war with context APP.

    2. Thus my weblogic url = http://localhost:7001/console/login/LoginForm.jsp

    3. My application url = http://localhost:7005/APP/Login.jsp

    4. now, in iisproxy.ini what should be the value of “WebLogicPort”

    7001 or 7005

    5. what should be the value of “WlForwardPath”,

    / (single forward slash)

    or

    /APP

    1. thanks for your appreciation John.. the path should be your app name.. if u want to forward to all the application the use a single forward slash

  3. hi Dear,

    I followed all the above steps as it is, but when i tried to test the Default web site http://localhost/examplesWebApp it is throwing Error 404: Not found

    Help is needed.

    FYI: I am using 64-bit of binaries on Windows server 2008 R2 (64-bit)

  4. Hi Chetan,

    Thank you for your article, it is really helpful and surely saved a lot of hours for people like me who unsuccessfully tried to use Weblogic proxy with latest IIS versions.

    Does the same technology works also with IIS 8.5 running under Windows Server 2012 R2? Is there any difference? Should I use the same steps as described in your article to configure it?

    Thank you,

    Alexander

Comments are closed.