Reputation: 4253
I need to deploy two applications as WAR files on Websphere. Both of them will require only HTTPS access.
Is it possible to run these two web applications on separate ports on same Websphere instance?
For example, will it be possible to access two applications like this:
https://192.101.1.101:7070/WebApplication1/
and
https://192.101.1.101:7080/WebApplication2/
(Same IP, same protocol(https), different ports)
Upvotes: 4
Views: 6432
Reputation: 4253
IBM WAS Standalone server allows creation of multiple profiles on same server using Profile Management Tool. It is almost like there are two IBM installations on the same server.
There are two Windows processes one for each profile. And the entire set of ports are incremented automatically making them as two different app server instances. Its easy to manage both using the Profile management tool. Also, they have separate consoles where settings can be adjusted.
Upvotes: 0
Reputation: 4253
After some analysis I came to the below conclusion.
To sum it up:
In case of WAS 8 standalone, web servers need to be used as reverse proxies. Forwarded requests from those reverse proxies can be filtered in WAS so that specific webapps are mapped to specific virtual hosts.
Upvotes: 0
Reputation: 5079
Yes, (on WebSphere Application Server V8.5.5) and here is an example of how to do it:
<httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080" />
<httpEndpoint id="localHostOnly" host="localhost" httpPort="9081" />
<virtualHost id="alice">
<hostAlias>your_host_name:9080</hostAlias>
</virtualHost>
<virtualHost id="bob">
<hostAlias>localhost:9081</hostAlias>
</virtualHost>
<application id="App1" location="myApp.ear" name="App1"
type="ear"/>
<application id="App2" location="myApp2.war" name="App2"
type="war"/>
From IBM:
The defaultHttpEndpoint exposes all interfaces on port 9080, the http endpoint with id="localHostOnly" specifies host="localhost", meaning that port 9081 is only exposed on the localhost interface.
If App1 has a WAR file with an ibm-web.bnd.xml file specifying
<virtual-host name="alice"/>
then this application can only be accessed at your_host_name:9080/app1_context_root.If App2 (which is a WAR) has an ibm-web-bnd.xml file specifying
<virtual-host name="bob"/>
then this application can only be accessed at localhost:9081/app2_context_root.If a third application were deployed which specified no specific virtual host, that application in this configuration would be available on all interfaces of the defaultHttpEndpoint on port 9080, excluding your_host_name:9080 - for example it could be accessed on localhost:9080/app3_context_root.
For more info see the closing text on this APAR: http://www-01.ibm.com/support/docview.wss?uid=swg1PM97514
Upvotes: 1