How to set IBM Websphere 8 to serve web applications on different ports

portweb-applicationswebsphere

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)

Best Answer

Yes it is possible! However it depends on the WebSphere Version you are using. With WebSphere Application Server Network Deployment simply create a new JVM (aka "WebSphere Application Server") by navigation to "Servers > Server Types > WebSphere application servers > New ..." Each dedicated JVM has its own https ports (Servers > Server Types > WebSphere application servers > Ports). After creating the new jvm just deploy your two apps in the different jvms.

If you have the WebSphere Base Version, creating new JVMs is not supported in the GUI. You need to use wsadmin-scripting. This blog post describes how to create a new server with wsadmin.

As an alternative you could create a new profile (complete configuration set) on the same host. Use the manageprofile tool for that. This blog post explains how to create a new Websphere profile

Another solution is to add a transport chain and a port to the jvm. For that go to "Servers > Server Types > WebSphere application servers > server1 > Web container transport chains > New..." and give your chain a name and select "WebContainer-secure". Click next. Type in your wished secondary https port and click next and finish. Save the configuration and restart your websphere.

However this secondary https port can be used by both applications.

Related Topic