Instructions for configuring Reverse Proxy with the latest NGINX

Instructions for configuring Reverse Proxy with the latest NGINX Picture 1

In today's article, TipsMake will help you learn and configure Reverse Proxy with NGINX fully and in detail.  

While most popular applications can run as web servers on their own, the Nginx web server provides some advanced features such as load balancing, TLS/SSL, and acceleration that most specialized applications do not have. Using an Nginx reverse proxy allows you to take advantage of all of these benefits.

Benefits of using Nginx Reverse Proxy on an instance 

Some notable benefits of setting up an Nginx HTTPS reverse proxy:

Load Balancer: An Nginx reverse proxy can perform load balancing to evenly distribute client requests across backend servers. It also improves redundancy in case one server fails, the reverse proxy will simply reroute requests to another server according to the established policy.

Enhanced security: An Nginx reverse proxy can also act as a line of defense for backend servers. Configuring a reverse proxy ensures that the identity of the backend servers cannot be discovered.

Improved performance: Nginx is highly regarded for its ability to stream, deliver static content files, and parse URLs.

Easy logging and auditing: Since there is only a single point of entry when deploying an Nginx reverse proxy, logging and auditing becomes much simpler.

Encrypt the connection between the client and the Nginx reverse proxy using TLS, the encrypted and secure HTTPS connection helps users protect their data.

Now we will go into the main part of the article:

Model:

Instructions for configuring Reverse Proxy with the latest NGINX Picture 2

NGINX Reverse Proxy Configuration

Initialize NGINX repo:

Add the following content:

Import authentication signature:

Update repo information:

Install NGINX via the previous repo:

Configure firewalld to allow port 80:

Start and configure startup for the service:

Edit the configuration file /etc/nginx/nginx.conf

Add the following paragraph:

# where 192.168.5.20 is the address of the Backend Web Server

Restart NGINX service:

Apache Web Server Configuration (Backend)

Install httpd :

Configure firewalld to allow ports 80 and 443:

Start and configure startup for httpd service:

Edit the log format in the configuration file /etc/httpd/conf/httpd.conf

Edit at line 196:

Restart the httpd service:

Check the results

Go to the NGINX Reverse Proxy address on the client browser and you will be redirected to the Apache Web Server:

Instructions for configuring Reverse Proxy with the latest NGINX Picture 3

According to TipsMake share

4 ★ | 1 Vote

May be interested