# External Load Balancing using NGINX
Following steps are to deploy NGINX load balancer on preconfigured HPECP cluster with HA.
Pre-requisite
- HPECP Controller setup and Gateway with HA
# Deployment Process
Install nginx on the separate VM with CentOS 7
> yum install -y nginx
Create a " load-balancer.conf" file in the following path /etc/nginx/conf.d:
Sample load-balancer configuration file
Change the permissions for the load-balancer.conf file.
> chmod 0777 /etc/nginx/conf.d/load-balancer.conf
If you have trouble loading the page, check firewall is not blocking your connection. For example: on CentOS 7 the default firewall rules do not allow HTTP traffic, enable it with the commands below.
> firewall-cmd --add-service=http --permanent
> firewall-cmd --reload
Comment out the existing server information details in the /etc/nginx/nginx.conf file as shown below.
Restart and enable nginx service:
> systemctl enable nginx.service** > systemctl restart nginx.service** > systemctl status nginx.service**
NOTE
NGINX service should be Active and running.
Navigate to the NGINX configured IP on browser and HPECP gateway page should come up:
Logs can be checked in following path CLI /var/log/nginx on nginx server.