Nginx is a web server that can be used for various purposes which are:
For more details, one can refer to their official site.
But here we will try to build a quick understanding of Nginx which helps us to launch a web application instantly.
For simplicity here Nginx will be installed on the Ubuntu machine.
Nginx can be installed as
apt install nginx -y
Check Nginx status
systemctl status nginx
Once Nginx gets installed:
The Nginx binary resides inside
Nginx config directory path :
Nginx master config file:
Service Unit file:
Let's explore nginx binary
By seeing this output we can say, two major commands which we use very frequently are:
validate nginx configuration
reload nginx configuration without restarting nginx:
nginx -s reload