8 ms·
Nginx Playground
- tclancy 5y agoWe need some kind of Internet Treasure award and I nominate her. Bookmarking for the next time I am setting up a greenfield nginx install.
- maddyboo 5y agoAbsolutely. 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.
- MihaiSandor 5y agoWhat do you thing about this one: https://www.digitalocean.com/community/tools/nginx https://www.digitalocean.com/community/tools/nginx
- tclancy 5y agoCool, thanks.
- mmmpop 5y agoThis looks like a fantastic tool! Great work.
- podiki 5y agoVery 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.
- nerdponx 5y agoI 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.
- vkat 5y agoThis is awesome. I always enjoy her articles as they have so much depth.
- ushuz 5y agoThis is brilliant. Always wanting to have a playground for NGINX config like this.
- racl101 5y agoThat is cool! I know what I'm doing this evening!
- jmfldn 5y agoBest tech blog on the web. She's awesome.
- samch 5y agoThis is great! Only suggestion for an added feature would be to have a couple different versions of nginx to compare / test for regression.
- thrownaway561 5y agoi 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.
- minitech 5y ago> and a few other great playgrounds that others have made: > - CodePen for CSS/JS/HTML
- purerandomness 5y agoJulia is not a "dude". Julia also did not claim having created CodePen.
- deleted 5y ago[deleted]
- LilBytes 5y agoDude 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 https://en.m.wikipedia.org/wiki/Dude
- edoceo 5y agoFriend. 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.
- 5y ago
- petetnt 5y agoI 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!
- pagnol 5y agoI'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.
- flas9sd 5y agoI 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#location https://nginx.org/en/docs/http/ngx_http_core_module.html#loc...
- gkhartman 5y agoThis 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.
- HMH 5y agoNeat, 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/edf78e7775fea8888685a9a2956bc477#file-server-go-L76 https://gist.github.com/jvns/edf78e7775fea8888685a9a2956bc47...
- vanillax 5y agoIm getting CORS errors running this. Is this supposed to work with the example code or do I need to run a actual ngnix server?
- jvns 5y agoshould be fixed now, sorry about that!
- yatz 5y agoThis is gorgeous! Thank you, thank you, thank you!
- oefrha 5y agoNice. Tiny bug: unchecked err here: https://gist.github.com/jvns/edf78e7775fea8888685a9a2956bc477/b4b9901cf06903a800747649df66efcdd5efc881#file-server-go-L47 https://gist.github.com/jvns/edf78e7775fea8888685a9a2956bc47...
- iudqnolq 5y agoIs it necessary to run a separate httpbin per user?
- EvanDotPro 5y agoWow, 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!
- 57844743385 5y agoAfter 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.
- joshxyz 5y agoHell yeah, caddys multi domain reverse proxy tls is godsent. Used it to replace haproxy on some projects.
- ewenjo 5y agoThis is exactly what I've been needing for years. Finally, good work!