Nginx as a proxy server for a local network

I'm currently using squid as a proxy server for my local network, but I'm not entirely satisfied with it. Is Nginx also suitable for use as a proxy server on a local network? Is it actively being used for this purpose?


Solution 1:

nginx can be considered a "reverse" proxy (due to its "upstream servers" functionality).... when in this role, it is effectively a "load balancer".

a "normal" proxy, such as squid http proxy, socks, etc. fetches content on end user behalf, and sits in front of end users, making TCP/IP calls out to the internet web servers and ideally caching content.

nginx, when run as a reverse proxy, sits in front of server endpoints, usually load balancing between them.... therefore "reverse"... do not applicable to your needs.

Squid is going to be your best bet for a "regular" http proxy... a proxy that gets and caches content for your endusers that sit behind it.

Solution 2:

NGINX is many things, actually. It can be configured as both reverse or forward ("normal") proxy. The following is the list of application functions (capabilities) of NGINX:

  • Web Proxy (Reverse or Forward)
  • API Proxy
  • Web server
  • Load Balancer
  • WAF (Web Application Firewall)
  • Content cache
  • HTTP/2 gateway
  • TLS termination point

If you need 3 or more of these capabilities, I would go with NGINX, otherwise other solutions that offer one or two of these functions may be more appropriate (but requirements do change over time and in that regard NGINX, which is a small footprint component, may offer flexibility and satisfy future-state points of evolution).

Solution 3:

Nginx is a web server... so it is not being used to replace squid very frequently ;)

(Nginx proxy mode is different, it is used basically to transfer http requests to another server)