How to Configure Nginx Reverse Proxy on Plesk?

What is Reverse Proxy?

A normal proxy server is an intermediary server that can forward requests from multiple clients to the different servers through the internet & it also working on behalf of clients by providing private content. Reverse Proxy is a proxy server that sits between internal applications & external clients & sends the client request to the appropriate backend vps linux server & it provides good control to certify the smooth flow of network traffic between clients & server.

Nginx is an open-source, free, high-performance, reverse-proxy, IMAP/POP3 proxy server, etc & can improve the performance by serving static content & passing dynamic content requests to the apache server.

The reasons to install Reverse proxy are:

  1. If you have multiple servers then the reverse proxy can help to balance the load between servers & can also improve the performance.
  2. It provides a single point of contact for clients & can concentrate on logging & reporting across multiple servers.
  3. The main reason for install is privacy.

The reasons to recommend Nginx are:

  1. It can help to increase the security
  2. It can help him to improve the performance.
  3. It can help him to balance the load between servers.
  4. It can help him to easily logging & audit.
  5. It can be encrypting the connection between the client & reverse proxy with TLS.

Steps to Setup NGINX Reverse Proxy on Plesk Panel?

  1. Login to the Plesk panel & the after going to tools & settings & then click on Restricted mode setting.

         

2. After click on web server tab which was shown in the image & then after scroll down & see the nginx setting..

    

3. After, deselect the “proxy mode” & then after add this content on “Additional Nginx Directives” & then click on apply.

location / {

            proxy_pass       http://server_IP:3000;

            proxy_redirect   off;

            proxy_set_header Host $host;

            proxy_set_header X-Real-IP $remote_addr;

            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            proxy_set_header X-Forwarded-Host $server_name;

}

Note:- You can only change on Server_IP of 1st line & server_name of last line.

Learn how to scale, manage, and optimize your applications with a SLB. Read our solution brief "Get More from Your Enterprise Network".

DOWNLOAD SOLUTION BRIEF

Get started with CloudMinister Today