Installing Nginx Proxy Manager

listen tutorial

What is the Nginx Proxy Manager?
It is a system that has a clean, efficient and easy to configure web interface, without having to know much about Nginx or Letsencrypt.

Feature
– Beautiful and secure admin interface based
– Easily create forwarding domains, redirects, streams and 404 hosts without knowing anything about Nginx
– Free SSL using Let’s Encrypt or provide your own custom SSL certificates
– Access lists and basic HTTP authentication for your hosts
– Advanced Nginx configuration available for superusers
– User, permissions and audit log management

Distribution used:
Debian 11 (Bullseye) 64-bit minimal installation
How to improve productivity on your Debian after installation (Recommended)

Port Used
81 – Nginx Proxy Manager admin port
80 – Public HTTP gateway
443 – Public HTTP gateway

Network interface settings

For the configuration of the network interface I will use a configuration Pointopoint (Peer to Peer) so using only one public IP address, you can (must) read this tutorial to know several possibilities of network configuration think about how to save IP addresses.

In my example let’s assume that this server is connected to RouterOS/Mikrotik ether2 and my public IP address will be the 200.200.200.255

Now in your RouterOS we are going to create our Pointopoint gatewai 192.168.171.171 with the public IP address as the network.

If you don’t have a public IP to put on your server, then set a Private IP address and redirect ports 80, 81 and 443 to it, using your public IP that is on your router. Example:

And of course if you have an IPv6 address, be sure to configure your card! Example:

Docker installation

We will install the necessary packages as well as add the official Docker repository

Update the repository and install it

Docker Compose Installation

Let’s download Docker Compose, and add it to our server binaries as an executable.

Downloaded version was 2.0.6, but you can consult a more recent one at: https://github.com/docker/compose/releases/to check which version installed use:


Nginx Proxy Manager Installation

Create the directories where all the settings will be:

Create your Docker compose file with the configuration, to install the Nginx Proxy Manager and MariaDB containers with Docker Compose. (Set passwords)

Add:

Run the Docker Compose command

Wait for it to finish… then see if the containers that were created


open in browser if everything went well you will see:

Now open on port 81 and enter with:


When entering for the first time a form with information will be displayed for you to change your data, change your email and password.

Authoritative DNS Settings

So that we can forward the accesses we will need to configure a subdomain for each situation in our authoritative DNS server.

Let’s create a fictional scenario to illustrate better. We have 1 client receiving private IPs from the class of a CGNAT, and it requests a port forwarding for its DVR. The client receives the private IP address 100.64.0.71 (Fixed) your DVR is on port 80 on the local network 192.168.0.7. For each situation I will create a new subdomain, for example “dvrudi” in the authoritative DNS server pointing to the Public IP of your Nginx Proxy server, so I access “dvrudi.remontti.com.br”. Now, when accessing the roteato and creating the redirection, we will probably not be able to use port 80, as it is already the router’s access port 100.64.0.71, and it is quite possible that you closed it in your firewall as well to protect yourself from attacks , in this case use another port 60080 examples to make the direction for the port 80 of the DVR, the client does not even need to know about this port 60080 it is just the gateway of the Nginx Proxy. Now go back to NPM Admin, in the menu Hosts >> Proxy Hosts >> Add Proxy Host

If you wish, you can activate a free certificate with Lets Encrypt.

Now when accessing “dvrudi.remontti.com.br” it will be directly accessing the DVR. #happycustomer

Not cool? Now you can have an administrative panel to redirect web services, in the example I found the case of CGNAT, but you can use it for any other situation, as well as point to a subdirectory, and restrict access to it, you know these ERP pig that you access with /admin, you could restrict. Well, the NPM panel is very intuitive, for those who already know Nginx and know its many possibilities, you will find it sweet.

Upgrading from NPM

Liked? If you want to support the blog and make a donation to the cafe, I will be very happy for your recognition!

If you can’t donate, you can leave your thanks in the comments, I’ll also be happy to know that I helped. If you have any questions, please leave them too. If you prefer to get in touch click here.

Hug!


Source:
https://nginxproxymanager.com/guide/
https://github.com/NginxProxyManager/nginx-proxy-manager



Linux,Tutoriais,apache,cgnat,debian 11,nginx,Nginx Proxy Manager,proxy-cache,webserver,

#Installing #Nginx #Proxy #Manager

Leave a Comment

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