# Re: proxy\_redirect can't be def'd in an include file; ok in main config?

**URL:** <https://www.ruby-forum.com/t/re-proxy-redirect-cant-be-defd-in-an-include-file-ok-in-main-config/238646>\
**Category:** NGINX\
**Created:** [January 21, 2014, 8:31pm UTC](https://www.ruby-forum.com/t/re-proxy-redirect-cant-be-defd-in-an-include-file-ok-in-main-config/238646 "2014-01-21T20:31:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [January 21, 2014, 8:31pm UTC](https://www.ruby-forum.com/t/re-proxy-redirect-cant-be-defd-in-an-include-file-ok-in-main-config/238646/1 "2014-01-21T20:31:24Z")

</div>

On Tue, Jan 21, 2014, at 11:10 AM, Maxim D. wrote:  
…

> And it’s certainly a wrong list to write such questions. Thank  
> you for cooperation.  
> …

> > ```
> > location / {
> > 
> > ```
> > 
> > I get an error  
> > location / {  
> > …  
> > Most likely, there are other uses of the “includes/varnish.conf”  
> > include file in your config, and they cause error reported.

No, there aren’t. There is only one site enabled, and only one instance  
of includes/varnish.conf, in that site config.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [January 22, 2014, 2:05am UTC](https://www.ruby-forum.com/t/re-proxy-redirect-cant-be-defd-in-an-include-file-ok-in-main-config/238646/2 "2014-01-22T02:05:40Z")

</div>

Hello!

On Tue, Jan 21, 2014 at 11:30:29AM -0800, removed\_email\_address@domain.invalid wrote:

> > On Tue, Jan 21, 2014 at 10:55:58AM -0800, removed\_email\_address@domain.invalid wrote:
> > 
> > > ```
> > > }
> > > 
> > > ```
> > > 
> > > the “proxy\_pass” directive in  
> > > include includes/varnish.conf;
> 
> No, there aren’t. There is only one site enabled, and only one instance  
> of includes/varnish.conf, in that site config.

Sorry, but there are no reasons to trust your words more than  
nginx code, at least till you provide full configuration to  
reproduce what you claim see.

Please try checking again (an easy test is to just comment out  
this particular “include” directive, while preserving  
proxy\_redirect line in the include file). If it doesn’t help,  
please provide full configuration.

–  
Maxim D.  
[http://nginx.org/](http://nginx.org/)
