Nginx regex based location directive does not capture whole requested path

by W.M.   Last Updated May 15, 2019 22:00 PM

I have this location directive:

    location ~* ^/(_nuxt|_libs|_img|_fonts)/(.*) {
        alias /srv/nuxt/tools/dist/$1;
        try_files /$2 =404;
    }

This matches and serves successfully: /_img/logo.png

but not: /_libs/AryaBootstrap/css/bootstrap.min.css (returns 404).

Any idea what is going wrong here?

Tags : nginx regex


Related Questions


Updated July 15, 2015 17:00 PM

Updated April 08, 2015 18:00 PM

Updated April 13, 2015 03:00 AM

Updated July 31, 2017 05:00 AM

Updated October 30, 2017 23:00 PM