The surprising ways Nginx try_files actually works

Sdílet
Vložit
  • čas přidán 6. 09. 2024

Komentáře • 15

  • @nemk
    @nemk Před 11 měsíci +6

    I've been staring at nginx config files for years, totally clueless. Your explanation was a lifesaver! Fantastic video, please keep them coming.

  • @jamesfurey
    @jamesfurey Před 10 měsíci

    Loving your recent Nginx/server related video tutorials. Focused, clear, informative. Thank you!

  • @saddlebear
    @saddlebear Před 6 měsíci

    Excellent!!!

  • @easyvideott7505
    @easyvideott7505 Před 11 měsíci

    Thank you Chris

  • @christianhabermann6527
    @christianhabermann6527 Před 10 měsíci +1

    Thanks Chris, but it's sometimes very hard to understand you acustically, even after learning english for 27 years. For example 1:16 or 1:37, I cannot make out one word you say. Not complaining, just noticing ;) Love the channel!

  • @mityukov
    @mityukov Před 11 měsíci

    Curious about location matching. Say, I'm requesting /index.php?foo=bar - how come it is matching \.php$ ? It doesn't end on .php...

    • @mityukov
      @mityukov Před 11 měsíci

      So many nuances to understand before being able to actually write own Configs:)

    • @fideloper
      @fideloper  Před 11 měsíci +2

      ohh good point - not 100% sure but I don’t think the location regex tests the query string, just the URI itself

  • @HamidAliOfficial
    @HamidAliOfficial Před 11 měsíci

    for /test there is a directory test that contains test.png but does not contain any file mentioned in index directive... will this list all the files and folders or will show forbidden error?

    • @fideloper
      @fideloper  Před 11 měsíci

      in the example in the video it would be passed to /index.php (the fallback / last item in try_files) and the PHP app would respond with a 404

    • @HamidAliOfficial
      @HamidAliOfficial Před 11 měsíci

      @@fideloper but there is a test directory... i have seen directory listings and forbidden... i guess there will be a different configuration for that...

  • @taneliharkonen2463
    @taneliharkonen2463 Před 10 měsíci +1

    That content is valuable! But why do you have to speak so fast that the words you speak get mushed together. I repeated plenty of locations of the video multiple times and still have no idea what you said. Please slow down a bit and concentrate on articulation just a bit more. But still this information is golden. I find that nginx's documentation just sucks on this part (and a bit elsewhere too).. There is no clear concise guide to building config files. I have bumped into very weird try_files behaviour and still have no idea why they happen, but this helped a bit. Thanks!

    • @fideloper
      @fideloper  Před 10 měsíci

      just how I talk. i'm sure i'll slow down as I get more video experience (and I need to figure out a process to get closed captions on). CZcams transcriptions are pretty good tho, click that [cc] button!