Hacker News new | past | comments | ask | show | jobs | submit login
Nginx Playground (jvns.ca)
603 points by pradeepchhetri 21 days ago | hide | past | favorite | 41 comments



We need some kind of Internet Treasure award and I nominate her. Bookmarking for the next time I am setting up a greenfield nginx install.


What do you thing about this one: https://www.digitalocean.com/community/tools/nginx


Cool, thanks.


Absolutely. Julia is amazing. All of her work on Wizard Zines is so positive, helpful, approachable, and yet has enough depth that everyone from beginners to experts can learn something. She is an Internet Treasure for sure.


Neat, the backend is indeed very simple. If you prefer to run things locally, just invoking `nginx -c /path/to/nginx.conf -e err.log -g "daemon off;"` [1] and your curl command seems to be everything required, save for httpbin.

[1]: https://gist.github.com/jvns/edf78e7775fea8888685a9a2956bc47...


After many years devotion to nginx I ditched it for caddy.

I’d finally had enough of the complex configuration and pain implementing ssl.

No more. Just use caddy.


Hell yeah, caddys multi domain reverse proxy tls is godsent. Used it to replace haproxy on some projects.


Best tech blog on the web. She's awesome.


I have been wanting something like this for years, usually ending up with running the configs through some sketchy location block testers/validators and hacking together simplified setups so I can figure out why or how some nginx configurations are supposed to work. This is awesome, thanks a lot Julia!


I've always found it hard to get the Nginx config right and have at times done the following:

1. Run Nginx (or OpenResty in my case) in Docker

2. Have the config files in a volume

3. Have a script (Python, Bash or anything else) which watches the config files for changes, then first runs `nginx -s reload` in the Nginx container, and then executes a number of unit tests

For Emacs users there's also an nginx-mode which makes a bit more pleasant to edit the config files.


I did a lot of trial-and-error configs in the past when I could've used this. Finally taking the time to really internalize the matching-order of location modifiers paid out, can recommend. The gist: prefer prefix matching over regexes to know what happens

https://nginx.org/en/docs/http/ngx_http_core_module.html#loc...


Looks like a good tool to have. I've always had an issue with nginx and its configuration. I think it's because it's designed to look a lot more general and flexible than nginx really is. And it leads you to complete surprise when you stray outside the rather limited model nginx has for requests and things just start to not work. No error message, no explanation - if you're lucky you'll be able to dig enough to find a stackoverflow post explaining what you're doing will never work because of the order nginx is designed internally.

Apache at least never oversold its flexibility in this way.


Wow, I'm taken aback by this, in a good way. This is _such_ a great idea and useful tool! Very well executed too, if I may say so myself. I've been playing with it a bit and I can't even come up with anything substantive in the way of constructive criticism so far. That's coming from someone who's been a Nginx advocate for quite a while; talking about it at conferences, etc.

Julia, if you read this: Remarkable work! Based on the comments here, I'm late to the party but I'm glad was bored enough to come here and stumble across this tool and your blog!


This is awesome. I always enjoy her articles as they have so much depth.


Very nice, always running into confusion and lots of restarting with nginx. And reminds me of how great REPL development is in things like Lisp, very much like what is so helpful here.


This is great! Only suggestion for an added feature would be to have a couple different versions of nginx to compare / test for regression.



This looks super useful! I'll definitely be trying this out this weekend. I'd love to replace my docker/podman instance + scripts when trying to learn new config options/concepts quickly.


I love this idea. Personally I'd prefer a not-web-based version; maybe it wouldn't be too hard to hack something together with shell scripts on top of Docker.


Is it necessary to run a separate httpbin per user?


Im getting CORS errors running this. Is this supposed to work with the example code or do I need to run a actual ngnix server?


should be fixed now, sorry about that!


This is exactly what I've been needing for years. Finally, good work!


This is brilliant. Always wanting to have a playground for NGINX config like this.


This is gorgeous! Thank you, thank you, thank you!


This looks like a fantastic tool! Great work.


That is cool! I know what I'm doing this evening!


i love how humbly the author says that he is pretty bad at javascript but is the dude behind creating codepen. LOL

this looks really cool as i can't tell you how many times i've blown up our nginx server messing around with the configs. thank god i always copy the original one before.


Julia is not a "dude".

Julia also did not claim having created CodePen.


Dude is a unisex term. Dudette was the feminine equivalent for a while but hasn't been the case for a while.

I got corrected a while back. The more you know!

https://en.m.wikipedia.org/wiki/Dude


Friend. West coast, social justice types are recently pushing back on Dude as gender neutral. That wiki link even includes a key phrase "typically male". I grew up with terms Dudes and Chicks for the gender identity. And also consider Dude to generally mean any H.Sapien. Just fair warning.. people hella sensitive about this stuff and even the assumptions from just a few years ago are not as they were.

Not to just go in the weeds there, just had two days of conference with sessions on the social equity stuff.

And, I don't think anyone on this thread was being intentionally rude.


Funny, here in coastal socal lately I have been hearing women refer to each other as "dude" or "bro" or "man" sometimes even more often than I hear men do it

(And I have yet to see any guys get called out or corrected for saying "dude" or even "man" casually to a woman. Though that this is somewhat contextual)

Further, I think everyone should give good pause and thought as to whether or not they really want "west coast, social justice types" to dictate acceptable mores


Yeah that was more my point. If Dude is to become contentious and it's not to be identified as unisex, then so be it.

It hasn't been a sex specific pronoun for me in Australia or in the UK where I use to live. As you said, I don't think anyone here was being intentionally rude.


Oh. Oz. I've heard the language is a little more casual down there.

Kevin "bloody" Wilson still making music?


You can argue that 'dude' is gender neutral all you want.

'He', however, is never referring to a woman. There is no plausible deniability in this case. Let's not play dumb.


Fair enough, I had missed that.


'Dude' may be if you stretch it, but 'he' is not unisex:

> author says that he is pretty bad at javascript but is the dude behind creating codepen. LOL


Yeah, I understand she's a woman. Just pointing out dude isn't sex specific. Or hasn't been in my experience.


Ask your male buddies "how many dudes" they've slept with, see how gender-neutral it really is in your circles.


How is this relevant to this thread?

A commenter incorrectly assumed that a technical blog must, of course, be written by a guy. This was pointed out. Whether the word 'dude' is gender neutral or not is not helping.


> and a few other great playgrounds that others have made:

> - CodePen for CSS/JS/HTML




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: