12 comments

[ 3.6 ms ] story [ 49.8 ms ] thread
After switching to Traefik, I haven't looked back. I prefer the fully open source options of HAProxy or Traefik to the feature-paywalled "free tier" nginx of today. Capability wise, between the two they have everything ngx has and more*. Also, have you ever tried compiling ngx yourself (they don't include Lua modules support in their k8s Docker images)? It's not easy, interesting, or fun. More of a nightmare.

Finally, I sure don't miss feeling the urge to bookmark config helper articles like this one- nginx is challenging to configure well! Endless hidden options, and for whatever reason I found their documentation less helpful than HAProxy's.

If you are forced to continue using it, you have my sympathy.

* I've created some rather exotic LB setups as times to meet requirements.

> Also, have you ever tried compiling ngx yourself (they don't include Lua modules support

There's always OpenResty[1] which is a kind of "batteries included" version of nginx - I use it in preference to nginx these days because I do a lot of experiments with, e.g., the Lua, Redis, Postgres support OR has.

[1] https://openresty.org/en/

It suddenly feels like Nginx is a legacy system, in the same way Apache became a legacy system when Nginx was launched. If I need a web server my first instinct is to reach for Caddy, or if I just need a reverse-proxy then it's either Caddy or Traefik.
Do you have any recommendations for resources comparing Caddy and Traefik? I think I’m done with using nginx in personal projects and whatnot, but haven’t really looked into anything other than nginx (and Apache as necessity demands) for 5+ years now.
Hi guys, I agree with you that today there are a lot of better web servers like traefik, caddy and so one, but nginx is still popular and so one people use it wrong... So I decided to open source my own variant of configs for it)
I don't think you should feel a need to defend this. It's one of the more popular web servers on the Internet, and this looks like a great resource for it.
I would appreciate it, if you could annotate the config choices you made with the reason behind them. Example: sendfile on; # default is off tcp_nopush on; # default is off tcp_nodelay on; Why did you set those to on? What improvements do I get compared to the defaults?
Hey, thank you for suggestion, I'll think about it)
glad to see this posted. nginx has driven me crazy the past 4 days. After reading and reading and reading, and experimenting.. I have a feeling that when I ran lets encrypt certbot, it added some things in files that were needed, but became a problem when I actually made the config files that were needed to point to the new folders.. I'm still not sure actually.

I ended up just adding another domain name and configuring it from scratch to point to a matrix client folder, and then running the certbot expand.. and now it's working on a different domain.

Guides like this one posted are much more help trying understand the whole chain of things as opposed to a bunch of random pseduo answers via stackover and the like.

We are what, 6 or 7 years after Let's Encrypt changed how we deal with certificates? The fact that nginx still requires the perfect incantation of certbot, cronjobs and whatnot is mind-boggling.

I love nginx but it's hard to recommend it when other solutions exist that require zero fiddling and zero maintenance to get HTTPS working.

I really wish there was some better process than certbot for getting certificates. Feels sketchy as hell to have that thing running on my servers.