Skip to content

How To Blog

  • 6 Best Way to Fixing Apple Watch Keeps Disconnecting From iPhone Apple Watch
  • Top 10 Collaboration Tools for Remote Teams Software Reviews
  • Upgrade Windows Server from Evaluation to Full Windows
  • How Archive in Gmail Works Google Software/Tips
  • 7 Online Tools To Create Lessons For Students At Home

    7 Online Tools To Create Lessons For Students At Home

  • How to Turn On, Wake, and Turn Off Your Apple Watch Apple Watch
  • The best iPhone apps to turn photos into paintings and art iPhone
  • AirPods Not Charging how to fix Hardware

Configure NGINX Reverse Proxy – Step by Step

Posted on October 9, 2020 By blog_786 No Comments on Configure NGINX Reverse Proxy – Step by Step

Hello, and welcome to the article on installing and configuring NGINX as a reverse proxy.

This is a whitepaper, so we will not discuss the design and reason for using a reverse proxy. Instead, we’ll go straight to configuration and configure an NGINX reverse proxy.

Configure NGINX Reverse Proxy – Step by Step

First of all, we need to install the CentOS or Ubuntu servers, the latest releases are fine, and on top of that, we will install an NGINX reverse proxy.

Configure NGINX Reverse Proxy in CentOS

In my case, I am using CentOS 7.

So, after logging in, we need to run the following commands to enable the repository and install NGINX:

# yum install epel-release

Configure NGINX Reverse Proxy – Step by Step

This command adds the repositories where NGINX packages are located.

After the command completes, we should be greeted with the output “ Complete!” .

Configure NGINX Reverse Proxy – Step by Step

The next command we need to execute:

# yum install nginx

Configure NGINX Reverse Proxy – Step by Step

This command actually installs the NGINX package and includes it.

Our next steps are to enable the NGINX service, start the service, and add some firewall rules.

We need to execute the commands in the following order:

# systemctl enable nginx
# systemctl start nginx
# firewall-cmd –permanent –zone = public –add-service = http
# firewall-cmd –permanent –zone = public –add-service = https
# firewall-cmd –reload

The first two lines enable the service and start it. The following lines add HTTP and HTTPS exceptions to the firewall and reload the firewall configuration to apply the changes.

Now we can check if everything is working fine by going to the IP address or hostname of the server to see if we get the NGINX popup page.

Configure NGINX Reverse Proxy – Step by Step

It worked! Then let’s set it up as a reverse proxy.

To do this, we need to change the default configuration file. To do this, we will need to run this command:

# vi /etc/nginx/nginx.conf

Configure NGINX Reverse Proxy – Step by Step

Now that the file is open for editing, we press the INSERT key and look for the following configuration block:

Configure NGINX Reverse Proxy – Step by Step

As you can see in my case, by default it listens on port 80. Now, to set up a reverse proxy in the location block, we simply add the following line in curly braces:

proxy_pass http : // applications server;

Where applicationserver is the IP address of the web server to which you want to forward packets.

It is so simple!

Another thing to look out for is the location block. As you can see, there is one forward slash. This means that all requests sent to the NGINX server will be redirected to the internal host.

We can specify multiple locations, each of which will be directed to a different host, but we’ll talk about that in the next article.

Thanks for your time and I hope you enjoyed reading the article!

How-To Tags:Configure NGINX Reverse Proxy Step by Step, Configure NGINX Reverse Proxy in CentOS

Post navigation

Previous Post: Defending Against Remote Desktop Protocol Attacks
Next Post: Configure CentOS to Sync with NTP Time Servers

Related Posts

  • 7 Ways to Send your Location (GPS coordinates) to Someone How-To
  • How to do Research for YouTube Videos How-To
  • How to Measure Distance in Adobe Photoshop How-To
  • How to Protect and Filter your Twitter DMs How-To
  • How To Transfer WhatsApp To a New Phone How-To
  • Create a WiFi hotspot from Android which is already connected to WiFi How-To

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Wordpress

Recent Posts

  • How can I open an audible app for my computer?
  • Which DAW is better? – Fl Studio vs Ableton
  • The best Abelton tips and tricks for beginners
  • How Websites Work: Learn what works
  • Fast implementation of Google Analytics in Squarespace

Recent Comments

  1. How I Fix a Clock_Watchdog_Timeout BSOD in Windows 10 - How To Blog on How to Reset BIOS to Default Settings
  2. How I Fix a Clock_Watchdog_Timeout BSOD in Windows 10 - How To Blog on What to Do When Your USB Drive Is Not Showing Up
  3. Alexa Routines and Skills 2023: A Tutorial - How To Blog on How to Create a Routine With Amazon Alexa
  4. How I Fix a Clock_Watchdog_Timeout BSOD in Windows 10 - How To Blog on How To Enter Outlook Safe Mode To Fix Issues
  5. How I Fix a Clock_Watchdog_Timeout BSOD in Windows 10 - How To Blog on How To Roll Back A Driver In Windows 10
  • How to Download Your Personal Data From Google How-To
  • How to deactivate your Facebook account instead of deleting it Computer Tips
  • Enable Display Accommodations On iOS iOS
  • Top Ten Best Video Converter for Android that is not full of ads How-To
  • How to Share Files between Two Computers Using LAN Cable How-To
  • How Secure Is the Military-Grade AES Encryption Algorithm? Help Desk
  • How to Make a Fillable Google Docs Form With Tables How-To
  • The best laptops for photography 2021 Help Desk

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version