By default, IIS can only provide HTTP redirection capabilities, not the forwarding requirements.
Example: Http://localhost/app1 using HTTP redirection to HTTP://WWW.ABC.COM/APP1
Accessing the URL in the http://loalhost/app1/abc.html final browser address bar will change to http://www.abc.com/app1/abc.html
This is redirection (similar to Sendredirect in JSP), which is called forwarding (similar to forward in JSP) if the browser address bar is not changed.
Usually Weblogic/jboss applications, the frontend is forwarded through Apache, but with the plug-in provided by WebLogic, IIS can also implement similar functions
WebLogic installation directory under X:\Oracle\Middleware\wlserver_10.3\server\plugin\win\x64 There are 2 files:Iisforward.dll, Iisproxy.dll , which allows IIS to implement forwarding.
Steps:
1, create the site root directory at the specified location, for example: D:\website\, and copy the Iisforward.dll to this
2, the root directory, and then create a sub-application directory, such as App1, that is: D:\website\app1, and then copy the Iisproxy.dll to the directory , create a named Iisproxy.ini The file, content reference below:
1 weblogichost=localhost2 weblogicport=80803 connecttimeoutsecs=204 connectretrysecs=25 debug=on6 Wlforwardpath=/app1
Explain:
Line 1th, which represents the IP address of other webserver such as WebLogic (or JBoss)
Line 2nd, indicating ports for other webserver such as WebLogic (or JBoss)
Line 6th, which represents the ContextPath of the corresponding app on other webserver such as WebLogic (or JBoss)
3, under the D:\website\, create a new Iisforward.ini, the content reference below:
1 vhost1=localhost:802 Localhost:80=d:\website\app1\iisproxy.ini
Line 1th, which represents the IP and port for IIS server
Line 2nd, specify the vhost1 corresponding to the configuration from D:\Website\app1 under Iisproxy.ini read
If there are multiple virtual hosts, refer to this structure and continue adding
4. in IIS, add the application set App1 and, under the site to be forwarded, add the application App1
5. on the site to be proxied, add the ISAPI filter
Reference:
6. on the app App1, add "handler mappings"
Reference:
And finally, you can check
Normal, you should see the handler that you just added, the status is allowed, if the status is not allowed, manually adjust to allow status
7.Iisreset/restart Restart IIS
Finish the call!
Attached directory structure:
D:\Website\
│iisforward.dll
│iisforward.ini
│
├─app1
│iisproxy.dll
│iisproxy.ini
│web.config
│
└─app2
Iisproxy.dll
Iisproxy.ini
Web. config
Note: Web. config is automatically generated by IIS when you finish adding the mapping handler, as follows:
1 <?XML version= "1.0" encoding= "UTF-8"?>2 <Configuration>3 <system.webserver>4 <handlers>5 <Addname= "WebLogic IIS Proxy"Path="*"verb="*"Modules= "Isapimodule"ScriptProcessor= "D:\website\app1\iisproxy.dll"ResourceType= "Unspecified"Precondition= "Bitness64" />6 </handlers>7 </system.webserver>8 </Configuration>
If all goes well, you can see the effect:
This is the original application on JBoss App1
This is the effect that is forwarded by IIS: