<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Add-on:<br><br>Besides, as I explained earlier, having generic 'listen' directives implies some difficulties.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
<br>For example, I am using 2 virtual servers to serve content for the same server_name, one listening on port 80, the other on port 443, allowing me to serve cotnent for HTTP and HTTPS in different fashions.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
Using generic 'listen' directive breaks that system and I'm stuck.<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">What would be an acceptable solution?<br>Thanks,<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 Sat, Apr 6, 2013 at 10:52 AM, 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)">But as I noticed earlier, these configuration directives conflict with each other across multiple virtual servers...<br>That's a huge step backwards.<br>
<br></div>H<div style="font-size:small;color:rgb(51,51,153);display:inline">aving to specify them only once across every configuration file is counter-intuitive.<br></div><div style="font-size:small;color:rgb(51,51,153);display:inline">
Why isn't nginx able to summarize all the needs for listening sockets across configuraiton files before attempting to open them?<br></div><div style="font-size:small;color:rgb(51,51,153);display:inline">
Having to define those listening directives in a 'generic default server' is awkward and looks ugly.<br></div></div><div class="gmail_extra"><br clear="all"><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 Sat, Apr 6, 2013 at 6:39 AM, 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 Sat, Apr 06, 2013 at 02:25:54AM -0400, B.R. wrote:<br>
<br>
> Hello,<br>
><br>
> It seems I solved the problem...<br>
> It was indeed by reading a little more carefully the doc<br>
> <a href="http://wiki.nginx.org/HttpCoreModule#listen" target="_blank">http://wiki.nginx.org/HttpCoreModule#listen</a>, thanks @Lukas! ;o)<br>
><br>
> The '*:80' syntax is used for IPv4 listening, I don't understand why it<br>
> works as-is for you Ted. Maybe Maxim will be of a better help on that case.<br>
><br>
> It is said that the IPv6 syntax will make Nginx listen for the 6to4 IP<br>
> address syntax, making the websites reachable through IPv4, even if no<br>
> specific IPv4 binding exist for the listening sockets.<br>
> Using:<br>
> listen [::]:80;<br>
><br>
> I have:<br>
> $ sudo ss -lnp|grep nginx<br>
> 0 128 :::80<br>
> :::* users:(("nginx",***,11),("nginx",***,11))<br>
> 0 128 :::443<br>
> :::* users:(("nginx",***,12),("nginx",***,12))<br>
><br>
</div>> You shall *not* have 2 'listen' directive if you did not separate you IPv6<br>
<div>> and IPv4 stacks (with the sysctl net.ipv6.bindv6only directive set to 1).<br>
<br>
</div>This is wrong aproach and it will no longer work for you after<br>
1.3.x upgrade. As I already suggested, use<br>
<div><br>
listen 80;<br>
listen [::]:80 ipv6only=on;<br>
<br>
</div>instead as a portable solution, which doesn't depend on a system<br>
configuration. (In 1.3.x, the "ipv6only=on" part can be removed<br>
as it's now the default.)<br>
<div><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>
_______________________________________________<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>
</blockquote></div><br></div></div>