...

Open source softwares - NGINX

Back to Course

Lesson Description


Lession - #628 NGINX Reverse Proxy


NGINX Reverse Proxy

An proxy is a server that lives between inside applications and outside clients, sending client solicitations to the suitable waiter. A Nginx turn around intermediary server is an intermediary server that dwells behind the firewall in a private organization and guides client solicitations to the proper backend server. An reverse proxy gives an extra degree of reflection and control to guarantee the smooth progression of organization traffic among clients and servers.

Uses of Reverse Proxy Server

  • Load - Balancing: An opposite intermediary server can go about as a traffic cop dwells before our backend servers and conveying client demands across a gathering of servers in a way that speeds up and limit use while guaranteeing nobody server is over-burden, which can debase execution. On the off chance that the server isn't up, then the heap balancer diverts traffic to the excess web-based servers.
  • Web Acceleration: Nginx switch intermediary is utilized to pack outbound and inbound information, as well as reserve generally mentioned content, the two of which accelerate the progression of traffic among clients and servers.
  • Security and Anonymity: We can intercept requests of the clients headed for our backend servers, by doing this a reverse proxy server protects their identities and acts as an additional defense against security attacks.


Passing a Request to a Proxied Server

Whenever NGINX server intermediaries a solicitation, it sends the solicitation to a predefined proxied server, brings the reaction, and sends it back to the client. It is feasible to give an intermediary solicitations to a HTTP server or a non-HTTP server utilizing a predetermined convention. Upheld conventions incorporate FastCGI, uwsgi, SCGI, and Memcached. To pass a request to a HTTP proxied server, the proxy_pass order is characterized inside the area. For example:

location /some/path/ {  
    proxy_pass http://www.example.com/link/;  
}  


To pass a request to a non-HTTP proxied server, use the appropriate **_pass directive:
  • fastcgi_pass: it passes a request to a fastCGI server.
  • uwsgi_pass: it passes a request to an uwsgi server.
  • scgi_pass: it passes a request to an SCGI server.
  • memcached_pass: it passes a request to a memcached server.