How To Set Nginx Reverse Proxy Server On Aws

Hey, guys hope you all are doing good in today's article we are going to see how can we set reverse proxy using Nginx now don't get confused if you don't know what reverse proxy is so don't worry will cover all things from basic.

First, let's understand what reverse proxy is and where can we use it. A reverse proxy is basically an intermediate point that takes requests from the client and gets information on behalf of a client from the backend application. A reverse proxy is generally used for security purposes suppose you have one backend application that directly connects from your database so you don't want to expose it to the public directly but wants the public to use it so in that case, we can reverse proxy so that only reverse proxy can connect to our application and user can connect to reverse proxy application.

I hope you understand what reverse proxy is and how can we use it now let's get started on how to set it up in AWS.

Here I am using aws ec2 instance with the ubuntu 18.04 image which first we install the Nginx server and then will install the certbot to generate an SSL certificate for our domain(Note this is optional if you want to access reverse proxy with HTTPS request).

After doing the above steps open /etc/Nginx file in your favorite editor and scroll down there you will see a block of HTTP make changes in that according to your need block will look like shown below.

Note if not wanting to use SSL then change the port from 443 to 80.

After setting up just run the below command to start their Nginx server

Guys, here we come to the end of this blog I hope you all like it and found it informative. If have any query feel free to reach me :).

Guys follow me for such amazing blogs and if have any review then please let me know I will keep those points in my mind next time while writing blogs. If want to read more such blog to know more about me here is my website link https://avg-g.technology/.Guys Please do not hesitate to keep 👏👏👏👏👏 for it (An Open Secret: You can clap up to 50 times for a post, and the best part is, it wouldn’t cost you anything), also feel free to share it across. This really means a lot to me.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store