web server

NGINX is a web-based mostly cache server system. It is powerful and popularly known to have powered many sites and application. Possessing a very fast and powerful HTTP and reverse proxy server, it gets feasible to get accustomed quickly and simply retrieve data from the server and keep in NGINX cache server web pages. if Web user needs to indicate page, data served from this NGINX cache server. It is not required to make a request to the main server and hence it does not influence server performance.


When serving as a reverse proxy, NGINX acts as a front web server that passes the requests on to App servers on the rear, on completely different ports etc. NGINX will handle aspects like SSL / HTTPS, cache headers, and load balancing.

How to Install NGINX in UBUNTU:

Assuming that you are running an Ubuntu box, once you have set up your login and have apt updated, simply run the subsequent command in your prompt:

apt-get install nginx
How to Install NGINX in Windows :

1. Install NGINX for win 32
2. Create a batch file in c folder and rename as “start-php-fcgi.bat”
3. Write the following code in the batch file.

ECHO Starting PHP FastCGI…
c:\bin\RunHiddenConsole.exe C:\PHP\php-cgi.exe -b
Configure NGINX
root c:/www;
location ~ \.php$ {
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME
Usage of NGINX:

NGINX is a swift Web server compare than Apache. As a result of NGINX server does not get to new processes for every request. This makes it function in low memory limit.

Memoru Usage

The above chart can compare memory usage of Apache, NGINX, and Lighttpd.

Starting NGINX:

Once after installation is completed you would be required to re-start it.  So, you would be using the following command to start the NGINX server.

/etc/init.d/nginx start
Restarting NGINX:

Unfortunately, if NGINX has stopped and left, you would need to restart the NGINX. So, you would need to use the following command to restart the NGINX.

/etc/init.d/nginx restart
NGINX Location set:

This location set can be used for cache specific path file, you need to store this file in NGINX cache. If the client wants to show it will retrieve the data from cache not on the server.

server {
listen 80;server_name example.com;

root /var/www/example;location / {

try_files $uri $uri/ /index.html;


Advantages of NGINX:

Cache serving technique supported static and dynamic file

  • Supported different level of caching like Memcached, FastCGI, SCGI etc.
  • It is supported also SSL and TLS
  • Filter included for byte ranges and chucked responses.
  • Caching technology is also available on image and video formatted files.
  • It requires very less memory compared to using of apache.
Disadvantages of NGINX:

Difficulties to create a module: Because apache has a function called like APR (Apache Portable Runtime).It helps to create a module.But in NGINX that interface is missing

  • It is difficult to configure in web server system.
  • It is not possible to directly maintain session and cookie.
In the coming future, NGINX would be the leading web server comparative to the Apache. So, get yourself acquainted with the learning of NGINX right from the present moment to cut through the competition.