Learn about Centmin Mod LEMP Stack today
Register Now

Nginx PageSpeed Error when i turn on PageSpeed

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by giahancute2013, Nov 15, 2016.

  1. giahancute2013

    giahancute2013 New Member

    Oct 27, 2016
    Local Time:
    2:53 PM
    Maria DB 10
    I get error when i turn on PageSpeed

    [root@li1464-200 nginx]# service nginx restart
    Restarting nginx (via systemctl):  Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
    [root@li1464-200 nginx]# nginx -t
    nginx: [emerg] unknown directive "pagespeed" in /usr/local/nginx/conf/pagespeed.conf:1
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    How can i fix it?

    Thank you all
  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    5:53 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    FYI, 123.08stable no longer works with ngx_pagespeed, you need to update to 123.09beta01 for ngx_pagespeed. See news thread at Nginx 1.9.11 dynamic module compatibility. 123.08stable has disabled ngx_pagespeed and lua nginx modules due to incompatibility with nginx 1.9.11 dynamic modules.

    If you want ngx_pagespeed for now you need to update Centmin Mod to 123.09beta01 outlined here Beta Branch - Centmin Mod .09 beta branch Testing

    With 123.09beta01, set in /etc/centminmod/custom_config.inc persistent config file you create or already created and set:
    Code (Text):

    and then recompile Nginx 1.11.4 or higher via centmin.sh menu option 4

    Then tweak pagespeed.conf for your site and troubleshoot. Here's some links for examples and help
    1. https://centminmod.com/nginx_ngx_pagespeed.htm
    2. Nginx PageSpeed - This forum's pagespeed.conf | Centmin Mod Community
    3. Nginx PageSpeed - Nginx Pagespeed Troubleshooting steps | Centmin Mod Community
    4. Nginx, PHP-FPM & MariaDB MySQL | Centmin Mod Community
    5. Install & Upgrades or Pre-Install Questions | Centmin Mod Community