Reverse proxy


Can I ask what is the importance of using reverse proxy? is this for security?. I never tried to use this when I set up my server to deploy my app. please enlighten my mind

I am using NGINX and Ubuntu 22.04 LTS

Thank you in advance.

Yes it is about security. You hide your original IP-address. It is harder to know where your server is placed and adds another layer of hinder for any hacker. I use Cloudflare as proxy. Rather simple and as a bonus your site is cached for faster access. And in Cloudflare you can have double SSL for extra security. Cloudflare also offer many other benefits upon proxy. Like Auto Minify your HTML, CSS and Javascript. I still use the free plan…

Hi @sibertius ,

Thank you for the quick reply, so the purpose is to hide the original IP address?. can you give me example of an attack if we don’t use reverse proxy ?. Is the Cloudflare is free for the reverse proxy ?

Thank you in advance.

That can be one of the purposes. A reverse proxy is actually just an implementation of the middleware pattern, meaning you wrap something around your actual services to give it a capability it doesn’t have itself. This may indeed be security, but may also be caching, advanced logging, authentication, etc.

You could also use it to compose a website from several services, e. g., all URLs starting with /user are reverse proxied to the user service, all URLs starting with /order go to the orde service, etc.


Not the proxy itself, but Cloudflare service offer some protection against DDoS attacks. Let say that it is Cloudflare that offer several other protection services if you use their proxy service. I do think that you can fix your own proxy by letting Nginx hand over from one ip address to another ip address. But then you only get a small part of what a CDN offer.


1 Like