<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Hello,<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">It seems I solved the problem...<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
It was indeed by reading a little more carefully the doc <a href="http://wiki.nginx.org/HttpCoreModule#listen" target="_blank">http://wiki.nginx.org/HttpCoreModule#listen</a>, thanks @Lukas! ;o)<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
The '*:80' syntax is used for IPv4 listening, I don't understand why it works as-is for you Ted. Maybe Maxim will be of a better help on that case.<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
It is said that the IPv6 syntax will make Nginx listen for the 6to4 IP address syntax, making the websites reachable through IPv4, even if no specific IPv4 binding exist for the listening sockets.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
Using:<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">listen [::]:80;<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"><br>I have:<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
$ sudo ss -lnp|grep nginx<br>0 128 :::80 :::* users:(("nginx",***,11),("nginx",***,11))<br>0 128 :::443 :::* users:(("nginx",***,12),("nginx",***,12))<br>
<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">You shall <b>not</b> have 2 'listen' directive if you did not separate you IPv6 and IPv4 stacks (with the sysctl net.ipv6.bindv6only directive set to 1).<br>
</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I had that configuration before, but the sysctl configuration has an impact on the whole system and also on Java which, when listening on IPv6, seems not to be reachable through 6to4 syntax.<br>
<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I still need to confirm my websites are accessible in the same fashion with IPv4 or IPv6, but I guess my trouble comes from bad IPv6 routing, not from the webserver.<br>
<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Thanks for your input, everyone!<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:48 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 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><div>
<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>
<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></div></div>
</blockquote></div><br></div></div>