Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx PageSpeed Error when i turn on PageSpeed

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

Tags:
  1. giahancute2013

    giahancute2013 New Member

    10
    1
    3
    Oct 27, 2016
    Ratings:
    +1
    Local Time:
    12:34 PM
    1.1.4
    Maria DB 10
    I get error when i turn on PageSpeed

    Code:
    [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.
                                                               [FAILED]
    [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

    28,968
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,758
    Local Time:
    3:34 PM
    Nginx 1.13.x
    MariaDB 5.5
    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):
    NGINX_PAGESPEED=y
    NGXDYNAMIC_NGXPAGESPEED=y
    

    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