News for hackers. Stuff that matters.
Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Monday February 13, 2017 @07:09AM (#13634680)
Author here!

Biggest discovery when researching this was due to the ALPN requirement in Chrome [1], openssl 1.02 being required for ALPN, and the vagaries of Linux distro release schedules, Ubuntu 16.04 is the only LTS distro than can serve HTTP/2 to Chrome users.

When they're eventually announced, RHEL/CentOS 8 (Fedora already has the necessary openssl) and Debian 9 will also work. But right now Ubuntu is your only bet unless you want to build and maintain your own openssl. Which you don't.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=527066

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by lstamour on Monday February 13, 2017 @05:53PM (#13639585)
For Debian 8 (Jessie): There's a newer build of Nginx in jessie-backports with static OpenSSL 1.0.2: http://serverfault.com/questions/775298/debian-jessie-nginx-...
Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Monday February 13, 2017 @08:14PM (#13640408)
Interesting. What's the maintenance policy for jessie-backports? If it's best-effort it might be better to avoid suggesting people use it for a package as frequently updated as openssl.
Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by lstamour on Wednesday February 15, 2017 @03:48AM (#13650635)
It is indeed best-effort. You can follow along on packaging in https://packages.qa.debian.org/n/nginx.html and https://packages.qa.debian.org/o/openssl.html as well as backports' security mailing lists.

Given what I'm seeing on the Nginx build currently in backports, I might rely on backports for dependencies, but I'd seriously consider building your own Nginx from source and/or pay attention yourself to security warnings.

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by scottlinux on Monday February 13, 2017 @06:17PM (#13639778)
Debian 8 supports http/2 with the updated nginx provided in jessie-backports.
Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by feld on Monday February 13, 2017 @07:44PM (#13640275)
An opportunity for FreeBSD to shine then
Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by thresh on Monday February 13, 2017 @08:48AM (#13635118)
the configuration they provide is wrong on many things

1/ it says "An nginx config for your first million users",

but: worker_connections 768;

2/ html5-sse.conf:

proxy_buffering off;

bad idea for a loaded server / backend

proxy_cache off;

will enable proxy_cache, which is not defined anywhere, so this will actually fail to validate - and proxy_cache is already disabled when you're doing proxy_buffering off;

3/ https.conf:

resolver 8.8.8.8 8.8.4.4 valid=300s;

bad idea to trust anything but a local resolver, why do you trust internet to tell you IP addresses where you will go for ssl stapling info?

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Monday February 13, 2017 @09:22AM (#13635352)
1/ The article doesn't claim to support one million concurrent users. Top level directives are Ubuntu/RHEL defaults, but if you have a preferred scalability config please file an issue!

2a/ buffering is well known to break SSE. As the article notes, if you're not using SSE you should disable that include.

2b/ I thought the config parser would have caught this but didn't. Filed https://github.com/certsimple/nginx-http2-load-balancing-con... and fixed.

3/ If you think your own DNS server is going to be better maintained than Google's, sure. But not everyone else would.

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by thresh on Monday February 13, 2017 @09:38AM (#13635488)
2a/ ok, I misread what was the intention, maybe it's a good idea then

3/ it's not about "better maintained", it's about trusting the internet on sensitive data, which you should never do, because dns is easily spoofed and nginx resolver was not written to operate in a hostile environment. if you don't have a local caching resolver on your machine (which you should), even trusting your cloud provider dns is better than trusting goog one. nginx documentation even says " To prevent DNS spoofing, it is recommended configuring DNS servers in a properly secured trusted local network. " on http://nginx.org/r/resolver

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Monday February 13, 2017 @10:17AM (#13635836)
You're right: checking this out further, the nginx resolver seems to have a bunch of issues [1] which is concerning.

I've modified the config accordingly.

[1] http://blog.zorinaq.com/nginx-resolver-vulns/

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by thresh on Monday February 13, 2017 @10:44AM (#13636069)
Yep - the warning clause in the documentation is there because of those issues.

thanks!

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by thresh on Monday February 13, 2017 @09:44AM (#13635552)
There is a problem with this change: https://github.com/certsimple/nginx-http2-load-balancing-con...

proxy_set_header in html5-sse.conf will discard all other proxy_set_header included in proxy.conf a level above: "These directives are inherited from the previous level if and only if there are no proxy_set_header directives defined on the current level", http://nginx.org/r/proxy_set_header

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Monday February 13, 2017 @09:59AM (#13635676)
Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by tsewlliw on Tuesday February 14, 2017 @08:55AM (#13643482)
> 3/ If you think your own DNS server is going to be better maintained than Google's, sure. But not everyone else would.

Be careful here, Google will rate limit you very severely and waiting 10s for DNS responses inside Nginx is no fun. Most cloud providers will give you a good resolver via DHCP that is much more forgiving when you accidentally abuse it.

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Tuesday February 14, 2017 @11:11AM (#13644504)
Have already modified the file accordingly after Thresh's suggestion, see below. Thanks though!