Ngnix Server setup

What is NGINX:

NGINX is open-source software for web serving, reverse proxying, caching, load balancing, media streaming, and more. It started out as a web server designed for maximum performance and stability. In addition to its HTTP server capabilities, NGINX can also function as a proxy server for email (IMAP, POP3, and SMTP) and a reverse proxy and load balancer for HTTP, TCP, and UDP servers. 

Centos7 and app01

Login to the Nginx vm

    vagrant ssh web01

Verify Hosts entry, if entries missing update the it with IP and hostnames

    cat /etc/hosts

Update OS with latest patches

    apt update

    apt upgrade Install nginx

   apt install nginx -y

Create Nginx config file with below content

   vi /etc/nginx/sites-available/vproapp

upstream vproapp {

server app01:8080;

}

server {

   listen 80;

location / {

   proxy_pass http://vproapp;

}

}

Remove default nginx config

    rm -rf /etc/nginx/sites-enabled/default

Create link to activate website

   ln -s /etc/nginx/sites-available/vproapp /etc/nginx/sites-enabled/vproapp

Restart Nginx 

   systemctl restart nginx



Now our servers are up and running actively. It's time to see the output in the webpage. 

Still, we are in Nginx Server try the below command to get the ip address.

ipconfig 

It will give all the outputs like this 

HTTP:// 192.126.26.1:80

we don't want to mention port 80 because we already gave port 80 is the permanent port for Nginx. Once you enter that ip address on the webpage you will get into the login page which you can see below.


User Name: Admin_vp

Password: Admin_vp

this will bring you guys in and there you can see all details.


you will get the login page.


 

OUR PROJECT IS SUCCESSFULLY DONE! AND ITS UP AND RUNNING