[HN Gopher] Nginx Playground
       ___________________________________________________________________
        
       Nginx Playground
        
       Author : pradeepchhetri
       Score  : 552 points
       Date   : 2021-09-24 14:35 UTC (1 days ago)
        
 (HTM) web link (jvns.ca)
 (TXT) w3m dump (jvns.ca)
        
       | tclancy wrote:
       | 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.
        
         | MihaiSandor wrote:
         | What do you thing about this one:
         | https://www.digitalocean.com/community/tools/nginx
        
           | tclancy wrote:
           | Cool, thanks.
        
         | maddyboo wrote:
         | 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.
        
       | racl101 wrote:
       | That is cool! I know what I'm doing this evening!
        
       | ushuz wrote:
       | This is brilliant. Always wanting to have a playground for NGINX
       | config like this.
        
       | thrownaway561 wrote:
       | 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.
        
         | purerandomness wrote:
         | Julia is not a "dude".
         | 
         | Julia also did not claim having created CodePen.
        
           | [deleted]
        
           | LilBytes wrote:
           | 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
        
             | edoceo wrote:
             | 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.
        
               | tomc1985 wrote:
               | 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
        
               | LilBytes wrote:
               | 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.
        
               | edoceo wrote:
               | Oh. Oz. I've heard the language is a little more casual
               | down there.
               | 
               | Kevin "bloody" Wilson still making music?
        
             | yawaramin wrote:
             | '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
        
               | LilBytes wrote:
               | Yeah, I understand she's a woman. Just pointing out dude
               | isn't sex specific. Or hasn't been in my experience.
        
               | remram wrote:
               | Ask your male buddies "how many dudes" they've slept
               | with, see how gender-neutral it really is in your
               | circles.
        
               | cybernautique wrote:
               | Just asked two of my male acquaintances and received an
               | integer response. Of course, they're both bisexual, so
               | I've no way of confirming the gender-type of these
               | integers. Not sure I understand your point; are we
               | bowling for pedantry?
        
         | minitech wrote:
         | > and a few other great playgrounds that _others have made_ :
         | 
         | > - CodePen for CSS/JS/HTML
        
       | nerdponx wrote:
       | 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.
        
       | HMH wrote:
       | 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...
        
       | jmfldn wrote:
       | Best tech blog on the web. She's awesome.
        
       | vanillax wrote:
       | 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?
        
         | jvns wrote:
         | should be fixed now, sorry about that!
        
       | iudqnolq wrote:
       | Is it necessary to run a separate httpbin per user?
        
       | EvanDotPro wrote:
       | 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!
        
       | vkat wrote:
       | This is awesome. I always enjoy her articles as they have so much
       | depth.
        
       | petetnt wrote:
       | 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!
        
         | pagnol wrote:
         | 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.
        
       | 57844743385 wrote:
       | 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.
        
       | ewenjo wrote:
       | This is exactly what I've been needing for years. Finally, good
       | work!
        
       | yatz wrote:
       | This is gorgeous! Thank you, thank you, thank you!
        
       | mmmpop wrote:
       | This looks like a fantastic tool! Great work.
        
       | samch wrote:
       | This is great! Only suggestion for an added feature would be to
       | have a couple different versions of nginx to compare / test for
       | regression.
        
       | flas9sd wrote:
       | 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...
        
       | gkhartman wrote:
       | 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.
        
       | oefrha wrote:
       | Nice. Tiny bug: unchecked err here:
       | https://gist.github.com/jvns/edf78e7775fea8888685a9a2956bc47...
        
       | podiki wrote:
       | 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.
        
       ___________________________________________________________________
       (page generated 2021-09-25 23:02 UTC)