Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx PageSpeed Duplicate Header Location on find new post page with ngx_pagespeed enable

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by rdan, Jul 4, 2014.

  1. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    10:10 PM
    Mainline
    10.2
  2. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:10 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    notice you're using older ngx_pagespeed 1.8.31.3-beta and not 1.8.31.4-beta but i see both versions have some problem of duplicate location headers

    I see a bug report issue filed at https://github.com/pagespeed/ngx_pagespeed/issues/725

    and fix posted 4 days ago on a pull request not yet merged with master brand of ngx_pagespeed at https://github.com/pagespeed/ngx_pagespeed/pull/744

    so probably a few days away from master branch commit for it so once that is in place running centmin.sh menu option 4 for nginx upgrade would pull latest ngx_pagespeed git master code with the fix.
     
  3. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    10:10 PM
    Mainline
    10.2
    Nice :)
    I'm already using the latest pagespeed, only the screenshot is old :)
    We'll wait for the next update.

    Do you have an idea how to manually apply the fix?
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:10 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you could try editing centmin.sh and set variables and remove any existing pagespeed downloads from /svr-setup
    Code:
    NGINX_PAGESPEEDGITMASTER=n
    NGINXPATCH=y
    
    the first variable tells, centmin.sh to use non-master github code as Centmin Mod uses the master branch code and that routine always deletes the existing downloaded zips to ensure grabbing latest master code and for patching, the patches always get deleted too. So need to use non-master git code instead.
    Code:
    rm -rf /svr-setup/release-*
    rm -rf /svr-setup/ngx_pagespeed-release*
    then edit inc/nginx_upgrade.inc line 283 https://github.com/centminmod/centm...45bcbc4ea608000ec8/inc/nginx_upgrade.inc#L283 and raise sleep 60 to say 600 for 10 minutes (should really make it a variable in centmin.sh for .08 beta :) )

    then when you run nginx upgrade menu option 4 from centmin.sh before nginx actually upgrades it will pause for sleep 600 = 10 minutes while you patch whatever you need to in this case manually transpose fixes outlined at https://github.com/pagespeed/ngx_pagespeed/pull/744/files into /svr-setup/ngx_pagespeed-release-1.8.31.*-beta/src/ngx_pagespeed.cc

    then let nginx upgrade continue on it's own

    long way around but it's why i added NGINXPATCH option

    for next .08 beta

    centminsh_nginxpatch_delay.png inc_nginx_upgrade_nginxpatch_delay.png
     
    Last edited: Jul 4, 2014
  5. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    10:10 PM
    Mainline
    10.2
    Opz, it's a bit complicated :D
    I just wait for an update.
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:10 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  7. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    10:10 PM
    Mainline
    10.2
  8. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:10 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  9. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    10:10 PM
    Mainline
    10.2
  10. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:10 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    menu option 4 for nginx upgrade does that automatically for ngx_pagespeed when NGINX_PAGESPEEDGITMASTER=y https://github.com/centminmod/centminmod/blob/master/centmin.sh#L187

    Code:
    NGINX_PAGESPEEDGITMASTER=y   # Install ngx_pagespeed from official github master instead  
    specific lines that remove the git master tar.gz before hand is on lines 581 to 585 of inc/downloads.inc https://github.com/centminmod/centm...51b2227ec05f9f0775ebcf/inc/downloads.inc#L581
     
  11. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    10:10 PM
    Mainline
    10.2