<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Hmm...<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">@Maxim<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">

I guess I haven't understood your piece of advice, since 'listen' can only be used in 'server' directive...<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">What is it you wanted me to try, again? :oD<br>

</div><div class="gmail_extra"><div><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div>
<br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 8:02 PM, B.R. <span dir="ltr"><<a href="mailto:reallfqq-nginx@yahoo.fr" target="_blank">reallfqq-nginx@yahoo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div style="font-size:small;color:rgb(51,51,153)">I have indeed several virtual servers.<br></div><div style="font-size:small;color:rgb(51,51,153)"><br></div><div style="font-size:small;color:rgb(51,51,153)">





I have a specific one which serves different content whether a client connects in HTTP or HTTPS (basically the HTTP content provides directions for the HTTPS setup).<br></div><div style="font-size:small;color:rgb(51,51,153)">





I also have one virtual server which I want listening on IPv4 only, not IPv6.<br><br></div><div style="font-size:small;color:rgb(51,51,153)">That's why I prefer managing the listen directives in virtual servers rather than in the 'http' directive block.<br>





<br>Is there no other mean than using global 'listen' directives?<br></div><div class="gmail_extra"><div><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div>

<div><div class="h5">




<br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 6:21 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





Hello!<br>
<div><br>
On Fri, Apr 05, 2013 at 06:07:23PM -0400, B.R. wrote:<br>
<br>
> Hello,<br>
><br>
> @Maxim<br>
> I tried the duplicate configuration entries:<br>
> listen 80;<br>
> listen [::]:80 ipv6only=on;<br>
><br>
> I has the following error:<br>
> nginx: [emerg] duplicate listen options for [::]:80 in<br>
> /etc/nginx/conf.d/***.conf:3<br>
<br>
</div>If you have multiple virtual server{}s with the same listening<br>
sockets used, you have to specify listening options in a single listen<br>
directive only.<br>
<br>
That is, add "ipv6only=on" to a listen directive in first/default<br>
server in your configuration.  This will do the trick.<br>
<div><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/en/donation.html" target="_blank">http://nginx.org/en/donation.html</a><br>
<br>
</div><div><div>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">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>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>