4
Seph
4y

Somebody please save me from the flaming pile of shit that is nginx.

I don't want to deal with it's crappy .conf bullshit ever again. I don't want to deal with its lack of readable docs, or the way it gives zero direction in its errors.

Is there a nodejs solution for this yet? Please tell me there's something out there that isn't so old and stinky it makes me want to vomit.

Comments
  • 5
    controversial take calling nginx old and stinky and brave doing it here 😄👍
  • 2
    @heyheni was thinking the exact same thing
  • 3
    When Nginx is too complicated, here's my good friend Apache.
  • 6
    @C0D4 talk about old and stinky
  • 2
    You are lucky I am too tired to start
  • 4
    Not just talking down nginx but talking up something node related as a replacement?!

    Brave man.
  • 1
    It's obviously not helpful when server cannot tell which line of configuration is breaking things, but did you try to revert to previous state and see difference?
  • 1
    Caddy? Not node based (fuck that) but very simple.
  • 2
    I honestly wouldn't recommend a webserver built on javascript. The added abstraction of the jvm alone is bound to make things slower. If anything, I'd look in the opposite direction. Maybe there is a configurable, or already configured OS that would serve well as a webserver. If you have the resources.. Nginx runs pretty ubiquitously on most operating systems.. And afaik it's really stable when properly configured, but it can be a pain to get right. Is anything tripping you up in particular? I remember struggling with forwarding non-www requests on the subdomain, to the SSL subdomain. Last I checked, I'm still struggling lol

    Edit: or PaaS/SaaS as an option!
  • 0
    I mean, the real solution here is that someone needs to make something like https://regexr.com/ for nginx.conf so you can see what it would mostly do with any given url.

    I'm sure it's super nice, but holy crap it took 5 hours to get it to proxy_pass some stuff, and I'm still fighting to make it do it with https. Pretty much every-time I approach it, it takes multiple hours to get a few lines changed and working. It doesn't help that proxy_pass is involved.
  • 1
    @dontknowshit This is not something I want to be good at. Dark Souls, ofc. Compiled languages, why not? But the arbitrary configurations of something that routes http(s?) requests? The pay off is just so low knowing that with any language on earth (not brain-fuck) I can do more advanced string manipulation in far less time.
  • 0
    @Seph I think we should at least try to devise a way to solve the problem. Regexr doesn't solve the problem that regex is write-only, it only makes the situation bearable.
  • 0
    @Seph you have obtained my lol, sir
  • 0
    @vintprox nginx -t? Is that not enough?
  • 1
    @Seph FIVE HOURS?! Not to sound rude or anything but my first nginx reverse proxy was working after like 5 minutes including duckduckgoing for examples.

    May I ask what resources you used? The first time setting it up with PHP FPM took me hours but that was due to my own fuckups. Except for that I find it very easy to use.

    And feel free to ask questions, I use this on all my servers with many, many virtual hosts.
  • 0
    @linuxxx My first one took very little time as well. This one... I gave up. I found a hack to get around it. Good enough for me.
Add Comment