News for hackers. Stuff that matters.
Re:How to secure your website with Nginx and Let's Encrypt by eridius on Wednesday January 17, 2018 @05:11PM (#16172509)
If you're looking to get a simple server up and running that supports Let's Encrypt, it's a lot easier to use Caddy¹ than it is to set up Nginx with LE. Out of the box Caddy will automatically secure all your sites with LE (and automatically redirect http to https), and it also makes a lot of other common configurations much simpler than Nginx does.

Of course, there are still plenty of reasons to use Nginx, so documentation like this is great. But speaking as someone who had Nginx with LE set up and migrated over to Caddy some months ago, it's a lot simpler to manage my server (and especially set up new virtual hosts) now.

¹https://caddyserver.com

Re:How to secure your website with Nginx and Let's Encrypt by Xeoncross on Wednesday January 17, 2018 @05:17PM (#16172552)
The hard-sell when I first looked at caddy scared me away. "Non-commercial use only" isn't the kind of server I want to have as a default.

Update: Looks like you can skip the marketing site and use the https://github.com/mholt/caddy#install version for commercial projects (Apache 2.0).

Re:How to secure your website with Nginx and Let's Encrypt by mholt on Thursday January 18, 2018 @02:04PM (#16180218)
> "Non-commercial use only" isn't the kind of server I want to have as a default.

You mean, for free. (I'm not sure why businesses would expect that their critical software be free?) We sell commercial licenses of the binaries that of course allow commercial use. Or you can, as you said, build from source if you prefer to do that. The source code is Apache-licensed.

Re:How to secure your website with Nginx and Let's Encrypt by DKnoll on Wednesday January 17, 2018 @06:12PM (#16172974)
What about Caddy made it easier? It's very simple to set up a basic Nginx site and run certbot... like 'under 5 minutes' simple.
Re:How to secure your website with Nginx and Let's Encrypt by eridius on Wednesday January 17, 2018 @08:06PM (#16173730)
Caddy does it all without needing an external dependency or crontab or custom configuration to handle the HTTP challenge. Caddy config files also just end up being simpler in general. When I moved from Nginx to Caddy my vhost files ended up at least 50% smaller, if not more, and with a lot less repetition.

Note that when you create a new vhost in Caddy it automatically gets LE support. No need to update your crontab to pass the new domain to certbot.

Re:How to secure your website with Nginx and Let's Encrypt by DKnoll on Wednesday January 17, 2018 @08:13PM (#16173774)
Certbot manages its own cronjobs, same with changing the config to handle the HTTP challenge.

A reason not to use Caddy is significantly reduced performance as compared to Nginx.

Re:How to secure your website with Nginx and Let's Encrypt by mholt on Thursday January 18, 2018 @02:03PM (#16180193)
Caddy didn't break when Let's Encrypt disabled the TLS-SNI challenge. Many other ACME clients (even Certbot) did. Also, having a fully-integrated solution will be more reliable and lower-maintenance, especially in the long run.

And Caddy's faster than you think -- "significantly reduced performance" is an overgeneralization. Caddy may happily serve tens of thousands of requests per second. (It all depends on, well, a lot of things.)

Re:How to secure your website with Nginx and Let's Encrypt by eridius on Wednesday January 17, 2018 @08:27PM (#16173838)
Sure, if you’re at the point where the performance of Caddy is a limitation, by all means switch to Nginx. My sites aren’t even close to that limit though, and it’s a lot simpler to start out with Caddy. No sense in doing unnecessary work before you need to.
Re:How to secure your website with Nginx and Let's Encrypt by DKnoll on Wednesday January 17, 2018 @08:32PM (#16173872)
There isn't a hard limit (that I know of), you're just consuming more resources for each page load and likely doing it slower than nginx would.
Re:How to secure your website with Nginx and Let's Encrypt by eridius on Wednesday January 17, 2018 @09:58PM (#16174290)
By the same argument you should never use node.js or ruby or python or whatnot to write your app and should always use something like C++ or Rust.
Re:How to secure your website with Nginx and Let's Encrypt by DKnoll on Wednesday January 17, 2018 @10:01PM (#16174311)
If you consider creating a ~10 line site config in nginx equivalent to developing an entire application in Rust... sure?