Welcome to Centmin Mod Community
Become a Member

Nginx The ?: prefix is a 'non-capturing' mark

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by rdan, Jun 2, 2022.

  1. rdan

    rdan Premium Member Premium Member

    5,294
    1,315
    113
    May 25, 2014
    Ratings:
    +2,036
    Local Time:
    5:32 AM
    Mainline
    10.2
    Some performance benefits?
    It says here:
    Nginx Configuration Examples » KBeezie

    On CMM:
    centminmod/staticfiles.conf at master · centminmod/centminmod


    You just use:
     
  2. eva2000

    eva2000 Administrator Staff Member

    48,899
    11,189
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,423
    Local Time:
    7:32 AM
    Nginx 1.21.x
    MariaDB 10.x
  3. rdan

    rdan Premium Member Premium Member

    5,294
    1,315
    113
    May 25, 2014
    Ratings:
    +2,036
    Local Time:
    5:32 AM
    Mainline
    10.2
    I already applied it on my live site, already done testing and works fine.
     
  4. eva2000

    eva2000 Administrator Staff Member

    48,899
    11,189
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,423
    Local Time:
    7:32 AM
    Nginx 1.21.x
    MariaDB 10.x
    Was talking more about testing performance differences as not sure how much benefit it would be given Centmin Mod Nginx also uses PCRE JIT/PCRE2 JIT. But if folks want to switch their staticfiles.conf to non-capturing mark, you can do it easily using instructions using sed replacements at centminmod /usr/local/nginx/conf/staticfiles.conf non-capture mark regex switch

    Probably wouldn't hurt to eventually use this in staticfiles.conf by default though :)
     
  5. eva2000

    eva2000 Administrator Staff Member

    48,899
    11,189
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,423
    Local Time:
    7:32 AM
    Nginx 1.21.x
    MariaDB 10.x