# Forward proxy configuration for Nginx

**URL:** <https://www.ruby-forum.com/t/forward-proxy-configuration-for-nginx/197372>\
**Category:** NGINX\
**Created:** [October 13, 2010, 3:33pm UTC](https://www.ruby-forum.com/t/forward-proxy-configuration-for-nginx/197372 "2010-10-13T15:33:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [October 13, 2010, 3:33pm UTC](https://www.ruby-forum.com/t/forward-proxy-configuration-for-nginx/197372/1 "2010-10-13T15:33:22Z")

</div>

I got Nginx working as a forward proxy to the internet by replacing the  
backend host with $http\_host variable (basically using the host name  
passed in the request instead of fixed IP address from the conf file).

It seems to be working fine but sometimes the requests time out (from  
the client). My question is this - Functionally (and protocol  
compliance-wise and with respect to behavior), is there anything else  
that Nginx doesn’t do that makes it not suited for forward proxy  
deployment in an enterprise network ? I’ve read forum answers saying  
that Squid is better for such purposes but I was hoping to make use of  
performance benefits of Nginx by installing it as a forward proxy.

Posted at Nginx Forum:

> **[Forward proxy configuration for Nginx](https://forum.nginx.org/read.php?2,140078,140078#msg-140078)**
>
> I got Nginx working as a forward proxy to the internet by replacing the backend host with $http\_host variable (basically using the host name passed in the request instead of fixed IP address from the conf file). It seems to be working fine but...
