I see so many posts and people who run NGINX as their reverse proxy. Why though? There’s HAProxy and Apache, with Caddy being a simpler option.

If you’re starting from scratch, why did you pick/are you picking NGINX over the others?

  • miau@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    24
    ·
    3 months ago

    Honest question: why not use nginx?

    I have run it in so many different scenarios, both professionally and personally, its crazy. Nginx has never failed me, literally. My homeserver is quite limited but nginx has a very small footprint, it performs beautifully well and it satisfies all my hosting, proxying, redirecting and streaming needs.

    It works for modern and legacy applications, custom code, webhosting, supports all the modern features and its configuration is very easy with literal thousandsof examples available online.

    Apache probably can do all that but I hate how unintuitive its configuration is to me personally. HAproxy cant do half the stuff nginx does.

    As for caddy Ive heard of it but never really used it. What does it offer that nginx doesnt?

    • 486@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      3 months ago

      What does it offer that nginx doesnt?

      Automatic HTTPS, you don’t have to use certbot or something similar to get/renew certificates. Also, its configuration is really simple and straight forward.

      • miau@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 months ago

        Thank you for your reply!

        Personally I am fine with nginx configuration, at least when using containers. The syntax is fine and all I need to do is map one file into the container

        But I took a look at the automatic cert feature and wow, that is very, very nice. I may give caddy a try for this feature only - it would simplify my current setup.

        I am also surprised it allows using HTTPS over port 443 for cert renewal. I didnt even know this was possible, so I was always stuck with DNS challanges.

        So again, thanks for your reply!

    • seang96@spgrn.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 months ago

      The only time I use caddy is to serve static files… I then put a nginx proxy in front of it to expose it lol