How to Use Nginx with WebSphere Application Server
How to Use Nginx with WebSphere Application Server
Home → Nginx
Advertiser disclosure
Chandan Kumar
Contributor
IBM WAS (WebSphere Application Server) usually go with IBM HTTP Server, However; then this
quick guide will help you.
IHS is based on Apache HTTP server, and it works, but when it comes to performance, then
nothing beat Nginx web server.
https://geekflare.com/nginx-integration-websphere/ 1/8
22/05/2024 11:46 How to Use Nginx with WebSphere Application Server?
Let’s see what it takes to integrate Nginx with IBM WAS. The following is demonstrated in
Linux environment.
I assume you have installed WAS & Nginx. If not, here is quick guide to installing Nginx
You don’t need to use the WebSphere Plug-in. Instead, we will use proxy_pass
You can either forward all request to WebSphere or by context root in location directive
You need to specify all JVM host and port manually in Nginx configuration file
upstream wasservers {
server localhost:9080;
server localhost:9081;
}
Note: if your WAS server is different than Nginx then you got to ensure necessary ports are
allowed in the firewall.
Next, I will instruct Nginx to forward all request to a newly created wasservers backend.
proxy_pass http://wasservers;
location /
{
proxy_pass http://wasservers;
proxy_set_header Host $host;
}
https://geekflare.com/nginx-integration-websphere/ 3/8
22/05/2024 11:46 How to Use Nginx with WebSphere Application Server?
This is very basic configuration to get IBM WAS integrated with Nginx as front-end web
server.
Configuring load balancing – you can setup a load balancing to distribute request based on
client IP. This would be useful or necessary if you have multiple JVM’s and want to persist the
connection.
upstream wasservers {
ip_hash;
server localhost:9080;
server localhost:9081;
}
https://geekflare.com/nginx-integration-websphere/ 4/8
22/05/2024 11:46 How to Use Nginx with WebSphere Application Server?
Taking WAS JVM out – if you have configured multiple JVM’s and for some reason one of
them are having an issue, then you have two options.
Either you delete the JVM server: port from an upstream module or
leverage down parameter to temporarily disable the request forwarding.
For ex:
upstream wasservers {
ip_hash;
server localhost:9080;
server localhost:9081 down;
If you are looking for advanced configuration like session affinity, health checks, etc., hen you
got to use Nginx Plus.
I hope this short note give you an idea how to implement Nginx as a web server in front of
IBM WAS. You may also refer to IBM official guide for more details.
Chandan Kumar
Contributor
https://geekflare.com/nginx-integration-websphere/ 5/8