This is evident from the post that Nginx is one of the most popular and growing web servers across the globe. Its faster than apache.
Let us see how we can install Nginx on Ubuntu, Centos and other platforms.
Installation Using Package Manager
mkdir nginx
cd nginx
wget http://nginx.org/download/nginx-1.19.5.tar.gz
tar -zxvf nginx-1.19.5.tar.gz
cd nginx-1.19.5
./configure
sudo apt-get install build-essential
sudo apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev
nginx path prefix: “/usr/local/nginx”
nginx binary file: “/usr/local/nginx/sbin/nginx”
nginx modules path: “/usr/local/nginx/modules”
nginx configuration prefix: “/usr/local/nginx/conf”
nginx configuration file: “/usr/local/nginx/conf/nginx.conf”
nginx pid file: “/usr/local/nginx/logs/nginx.pid”
nginx error log file: “/usr/local/nginx/logs/error.log”
nginx http access log file: “/usr/local/nginx/logs/access.log”
nginx http client request body temporary files: “client_body_temp”
nginx http proxy temporary files: “proxy_temp”
nginx http fastcgi temporary files: “fastcgi_temp”
nginx http uwsgi temporary files: “uwsgi_temp”
nginx http scgi temporary files: “scgi_temp”
./configure –modules-path=/etc/nginx/modules –sbin-path=/usr/bin/nginx –conf-path=/etc/nginx/nginx.conf –pid-path=/var/run/nginx.pid –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log –with-http_ssl_module –with-pcre –with-zlib –with-pcre –with-http_v2_module
nginx path prefix: “/usr/local/nginx”
nginx binary file: “/usr/bin/nginx”
nginx modules path: “/etc/nginx/modules”
nginx configuration prefix: “/etc/nginx”
nginx configuration file: “/etc/nginx/nginx.conf”
nginx pid file: “/var/run/nginx.pid”
nginx error log file: “/var/log/nginx/error.log”
nginx http access log file: “/var/log/nginx/access.log”
nginx http client request body temporary files: “client_body_temp”
nginx http proxy temporary files: “proxy_temp”
nginx http fastcgi temporary files: “fastcgi_temp”
nginx http uwsgi temporary files: “uwsgi_temp”
nginx http scgi temporary files: “scgi_temp”
make
make install
nginx