<div dir="ltr">Thx! <div><br></div><div>I resolve my miss configuration. </div><div><br></div><div>Only changing of position my include to the final of file.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-04-07 12:13 GMT-05:00 Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello!<br>
<div class=""><br>
On Mon, Apr 07, 2014 at 11:17:40AM -0500, Raul Hugo wrote:<br>
<br>
> Hey Maxim, thx for your answer.<br>
><br>
> On my /etc/nginx/nginx.conf I put this:<br>
><br>
> limit_conn_zone $binary_remote_addr zone=one:63m;<br>
><br>
> And on my .conf of my project located on /etc/nginx/vhost.d/myproject.conf<br>
><br>
> I put this :<br>
><br>
> on the server configuration:<br>
><br>
> location / {<br>
><br>
> limit_conn one 10;<br>
><br>
> }<br>
><br>
> Nginx read the include first, if this line it before the limit_conn_zone<br>
> directive?<br>
<br>
</div>Include will, literally, include contents of its argument. That<br>
is, something like<br>
<br>
include /path/to/file/with/limit_conn;<br>
limit_conn_zone ...<br>
<br>
is essentially equivalent to<br>
<br>
<contents of /path/to/file/with/limit_conn><br>
limit_conn_zone ...<br>
<br>
You have to define limit_conn_zone before it's used, and hence<br>
before the include of the server configuration.<br>
<div><div class="h5"><br>
> 2014-04-07 11:02 GMT-05:00 Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>>:<br>
><br>
> > Hello!<br>
> ><br>
> > On Mon, Apr 07, 2014 at 09:51:31AM -0500, Raul Hugo wrote:<br>
> ><br>
> > > What am I doing wrong here?<br>
> > ><br>
> > > http {<br>
> > > limit_conn_zone $binary_remote_addr zone=one:63m;<br>
> > ><br>
> > > server {<br>
> > > location /downloads/ {<br>
> > > limit_conn one 10;}<br>
> > ><br>
> > > [root@batman1 ~]# service nginx configtest<br>
> > > nginx: [emerg] the size 66060288 of shared memory zone "one" conflicts<br>
> > > with already declared size 0 in /etc/nginx/nginx.conf:60<br>
> > > nginx: configuration file /etc/nginx/nginx.conf test failed<br>
> > ><br>
> > ><br>
> > > I read the nginx manual online, and it look well. I hope that someone<br>
> > have<br>
> > > a tip.<br>
> ><br>
> > From the message it looks like you've tried to use limit_conn<br>
> > before limit_conn_zone is defined (probably indirectly by using<br>
> > the "include" directive), i.e. wrote something like<br>
> ><br>
> > limit_conn one 10;<br>
> > limit_conn_zone $binary_remote_addr zone=one:63m;<br>
> ><br>
> > --<br>
> > Maxim Dounin<br>
> > <a href="http://nginx.org/" target="_blank">http://nginx.org/</a><br>
> ><br>
> > _______________________________________________<br>
> > nginx mailing list<br>
> > <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> ><br>
><br>
><br>
><br>
> --<br>
> Un abrazo!<br>
><br>
><br>
</div></div>> *Raśl Hugo <<a href="http://twitter.com/raulhugo" target="_blank">http://twitter.com/raulhugo</a>>*<br>
><br>
><br>
> *Miembro Asociadohttp://<a href="http://apesol.org.pe" target="_blank">apesol.org.pe</a> <<a href="http://apesol.org.pe/" target="_blank">http://apesol.org.pe/</a>>SysAdmin Cel.<br>
<div class="">> #961-710-096 Linux Registered User #482081 - <a href="http://counter.li.org/" target="_blank">http://counter.li.org/</a><br>
> <<a href="http://counter.li.org/" target="_blank">http://counter.li.org/</a>>P Antes de imprimir este e-mail piense bien si es<br>
</div>> necesario hacerlo*<br>
<div class="HOEnZb"><div class="h5"><br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br>
<br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" target="_blank">http://nginx.org/</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Un abrazo!<br>
<br><div><b><b style="font-weight:normal"><span><a href="http://twitter.com/raulhugo" style="color:rgb(0,0,0)" target="_blank"><b>Raśl Hugo</b></a><br></span></b></b><b><span style="font-weight:normal"><div style="display:inline!important">
<b>Miembro Asociado</b></div></span><b style="font-weight:normal"><span><br></span></b><div style="font-weight:normal"><b><span><a href="http://apesol.org.pe/" target="_blank">http://apesol.org.pe</a></span></b></div><div>
SysAdmin </div><div style="font-weight:normal"><b>Cel. #961-710-096<b><b><b> </b></b></b></b></div><div><b><b><b> Linux Registered User #4</b>82081</b><span style="font-weight:normal"> - </span><a href="http://counter.li.org/" style="font-weight:normal" target="_blank">http://counter.li.org/</a><br>
</b></div><b><b style="font-weight:normal"><font face="Webdings" color="green" size="7"><span style="font-size:30pt;font-family:Webdings;color:green;font-weight:bold" lang="DE">P</span></font></b><b style="font-weight:normal"><font face="Webdings" color="green"><span style="font-family:Webdings;color:green;font-weight:bold" lang="DE"> </span></font></b><b style="font-weight:normal"><font face="Calibri" color="green"><span style="font-family:Calibri;color:green;font-weight:bold" lang="DE">Antes de imprimir este e-mail piense bien si es necesario hacerlo</span></font></b></b></b></div>
</div>
</div>