Welcome to Centmin Mod Community
Become a Member

When ORESTY_HEADERSMORE='n' Staticfiles.conf error

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by BamaStangGuy, Jan 24, 2018.

  1. BamaStangGuy

    BamaStangGuy Active Member

    526
    160
    43
    May 25, 2014
    Ratings:
    +212
    Local Time:
    3:22 AM
    When you set ORESTY_HEADERSMORE='n' and recompile, the following is added to staticfiles.conf every recompile which breaks nginx:

    Code:
        # prepare for letsencrypt
        # https://community.centminmod.com/posts/17774/
        location ~ /.well-known { location ~ /.well-known/acme-challenge/(.*) { more_set_headers    Content-Type: text/plain; } }
    Edit: Meant to put this in bug reports. Sorry.
     
    Last edited: Jan 24, 2018
  2. BamaStangGuy

    BamaStangGuy Active Member

    526
    160
    43
    May 25, 2014
    Ratings:
    +212
    Local Time:
    3:22 AM
    nginx.conf also has two more_set_headers entries that need to be removed.
     
  3. eva2000

    eva2000 Administrator Staff Member

    35,109
    7,752
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,954
    Local Time:
    6:22 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yeah for now ORESTY_HEADERSMORE='y' should be let alone it isn't really a bug really as Centmin Mod evolves, headers more usage has grown for alot of nginx configurations that Centmin Mod users right now compared to when ORESTY_HEADERSMORE was created.
     
  4. BamaStangGuy

    BamaStangGuy Active Member

    526
    160
    43
    May 25, 2014
    Ratings:
    +212
    Local Time:
    3:22 AM
    It'd be nice if these additons and future additions could be added / modified so that they would respect this flag when set to 'n'

    I have no use for Letsencrypt and the only other area I see more_set_headers is where it sets the CentminMod headers.
     
  5. eva2000

    eva2000 Administrator Staff Member

    35,109
    7,752
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,954
    Local Time:
    6:22 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    It's also used in centmin.sh menu option 22's wordpress installer as well for redis nginx level caching.
     
  6. BamaStangGuy

    BamaStangGuy Active Member

    526
    160
    43
    May 25, 2014
    Ratings:
    +212
    Local Time:
    3:22 AM
    Understandable. Anyone that needs those should leave it enabled. However, every time you recompile Nginx it is adding more_set_headers to one file that breaks nginx.

    It doesn't seem like a desired outcome. Either the option to disable more_set_headers should be removed or it should be respected in this instance.

    Its not the end of the world but I can't disable this module for customers. If they were to recompile on their own nginx would fail to start.
     
  7. eva2000

    eva2000 Administrator Staff Member

    35,109
    7,752
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,954
    Local Time:
    6:22 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yeah right.. for now you should keep ORESTY_HEADERSMORE='y'. I probably will end up forcing it to ORESTY_HEADERSMORE='y' as more configs and plans to leverage headers more are to come further down the track and Openresty nginx modules are optimised and shouldn't have performance overhead as they're used by OpenResty and alot of large web properties and sites. Just think of it this way i.e. one of your customers comes across a guide for a web app's nginx configuration which requires manipulation of headers beyond what Nginx can provide and need headers more and they add that config, but then find out it errors out or breaks and doesn't work as intended.
     
  8. rdan

    rdan Premium Member Premium Member

    4,229
    1,029
    113
    May 25, 2014
    Ratings:
    +1,470
    Local Time:
    4:22 PM
    Mainline
    10.2
    Don't remove those lines, just comment it out.
    No issues for me.
     
    • Like Like x 1
  9. BamaStangGuy

    BamaStangGuy Active Member

    526
    160
    43
    May 25, 2014
    Ratings:
    +212
    Local Time:
    3:22 AM
    Didn't think about that. Thanks.
     
..