Reverse Proxy Server is type of server which act as middleman between client and server. When client request to server, reverse proxy receive the request then forward to the server. Then, server send the response back to reverse proxy and the reverse proxy forward back to client.


  1. VM, im using ubuntu 22.04
  2. sudo access

Install nginx

First, we need to install nginx as reverse proxy.

sudo apt update -y && sudo apt install nginx -y

Install Docker

Then, we can install docker engine using single command line,

bash <(curl -s

Or you can install manually, check the step on docker documentation.

Run your docker container

In this example, im using nodejs hello world for the container


i already run the docker container and exposed in port 3000

Pointing domain to the server

pointing your domain with A record to server’s ip address

Configure NGINX

create virtualhost in /etc/nginx/sites-available

create link from sites available to sites enabled

ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/

check nginx configuration

nginx -t

reload the nginx service

service nginx reload

Testing reverse proxy


Setup letsencrypt SSL with certbot

to use ssl, we can setup with certbot. we need to install certbot and nginx plugin first.

sudo apt install certbot python3-certbot-nginx

setting certbot and select your host / domain

Test SSL / TLS with browser