Include additional files

Jörg Kastning joerg.kastning at synaxon.de
Fri Apr 26 05:47:13 UTC 2013


Ok. So the upstream block has to be in the nginx.conf. I thought I could
this one export to a separate file, too.

I was wondering why I still got the error message after I deleted the
upstream block in nginx.conf and had it only in my included file. So the
upstream configuration must be in nginx.conf?


2013/4/25 motto <nginx-forum at nginx.us>

> upstream name should be unique per entire config, you could name it in
> nginx.conf and than reference to its name from different your includes.
> like:
>          upstream loadbalancer  {
>                 server 192.168.0.1:8080;
>                 server 192.168.0.2:8080;
>                 server 192.168.0.3:8080;
>                 server 192.168.0.4:8080;
>         }
>
> than in certain location (in included file for example)
>             proxy_pass         http://loadbalancer;
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,238628,238629#msg-238629
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130426/5e647a07/attachment.html>


More information about the nginx mailing list