The surprising ways Nginx try_files actually works

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024

Комментарии • 15

  • @nemk
    @nemk Год назад +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 11 месяцев назад

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

  • @lunardesigner6779
    @lunardesigner6779 Месяц назад

    Thank man, this topic isn't cover much on the internet

  • @saddlebear
    @saddlebear 7 месяцев назад

    Excellent!!!

  • @easyvideott7505
    @easyvideott7505 Год назад

    Thank you Chris

  • @HamidAliOfficial
    @HamidAliOfficial Год назад

    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  Год назад

      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 Год назад

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

  • @mityukov
    @mityukov Год назад

    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 Год назад

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

    • @fideloper
      @fideloper  Год назад +2

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

  • @taneliharkonen2463
    @taneliharkonen2463 11 месяцев назад

    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  11 месяцев назад

      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). RUclips transcriptions are pretty good tho, click that [cc] button!