Hello Team,
I am working on the KodeKloud Engineer – Nginx Load Balancer task where we need to configure nginx on the LBR server and distribute traffic to the App Servers .
Task Summary:
- Install nginx on the LBR server.
- Configure load balancing using the
httpcontext for all App Servers. - Update only
/etc/nginx/nginx.conf. - Do not modify the Apache port configured on the App Servers.
What I have done so far:
- Installed nginx on the LBR server.
- Updated
/etc/nginx/nginx.confwith the following configuration:
upstream app_servers {
server stapp01:5001;
server stapp02:5001;
server stapp03:5001;
}
server {
listen 80;
location / {
proxy_pass http://app_servers;



}
}
- Verified nginx configuration:
nginx -t
Output:
syntax is ok
test is successful
- Restarted nginx:
systemctl restart nginx
- Verified backend servers are reachable:
curl stapp01:5001
Output:
Welcome to xFusionCorp Industries!
However, when I access the StaticApp URL , I still see the CentOS HTTP Server Test Page instead of the expected application output.
It seems the request is not being properly forwarded to the backend servers even though nginx syntax validation is successful.
Could someone please guide me on what I might be missing in the nginx configuration?
Thank you in advance.


