Live data from Hacker News

Nginx Development Guide

nginx.org

21–30 of 39 posts

Re: Nginx Development Guide

#24
post #19

Earlier quoted context omitted.

Have there been any good in-depth comparisons of the two recently (from an admin/user PoV, out-of-the-box featureset & performance for common tasks). I've not seen anything recent that isn't entirely superficial (little more than “I prefer the config format”, which while valid isn't exactly in-depth or in-bredth).

So I've been slowly moving from nginx to Caddy in new projects (old projects still use nginx). The reasons for this are: 1. Automatic ACME integration in Caddy compared to the mess of containers something like nginx-proxy-manager is or the unreliability of external solutions like certbot or acme.sh 2. nginx's config. Footguns like if are well known, but even just if you want to deploy a nginx server with virtual host…

> did you know that if there is no Host header nginx serves the site evaluated first in its config file (even if the site has a server_name directive)?

Before that it goes to the one named "" and if that doesn't exist, the one with default_server.

If traffic with no Host header went to no server by default, people would also call that a footgun...

Re: Nginx Development Guide

#25

There are a few additional ways to extend nginx without writing a module in C. - JavaScript: https://nginx.org/en/docs/njs/ and https://github.com/nginx/njs-examples - Lua: https://github.com/openresty/lua-nginx-module - Rust: https://github.com/nginxinc/ngx-rust

Proxy WASM appears to be supported thanks to a project from Kong: https://github.com/Kong/ngx_wasm_module

I haven't tried it yet, but it looks promising.

Re: Nginx Development Guide

#27
post #19

Earlier quoted context omitted.

Have there been any good in-depth comparisons of the two recently (from an admin/user PoV, out-of-the-box featureset & performance for common tasks). I've not seen anything recent that isn't entirely superficial (little more than “I prefer the config format”, which while valid isn't exactly in-depth or in-bredth).

So I've been slowly moving from nginx to Caddy in new projects (old projects still use nginx). The reasons for this are: 1. Automatic ACME integration in Caddy compared to the mess of containers something like nginx-proxy-manager is or the unreliability of external solutions like certbot or acme.sh 2. nginx's config. Footguns like if are well known, but even just if you want to deploy a nginx server with virtual host…

Regarding #1, NGINX has created a project to make ACME integration easier. It is quite new, so I doubt it will replace your use of Caddy, but it is worth consideration.

https://github.com/nginx/njs-acme

Re: Nginx Development Guide

#28

These days I'd rather develop on Caddy than Nginx.

I got caught in the hype and switched to caddy. After a year I'm now back with nginx and happier than ever.

I understand that one can probably methodologically master caddy, but from the perspective of someone who has been running web servers for decades and just needs to get things done, my god, caddy has the worst documentation of any product I've ever seen, and the most confusing configuration I can possibly imagine.

Confusion over v1/v2/json/yaml formats, documentation showing tiny snippets without telling how where they fit, etc. Not even ChatGPT4 can write caddy configuration.

For a long time I thought that my caddy config was blocking all IPs except the ones I listed. Turns out that no. The shit I wrote did nothing.

TLDR: Don't fall for the hype. Nginx is excellent.

Post reply on HN