Learn about Centmin Mod LEMP Stack today
Register Now

Nginx error after compiling nginx_pagespeed

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Afterward, Jul 13, 2016.

  1. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    4:54 AM
    1.7.5
    5.5
    hello again i need some help again ^^
    after i recompiled nginx with pagespeed enabled i get this error after
    Code:
    nginx: [emerg] unknown directive "charset" in /usr/local/nginx/conf/nginx.conf:42
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    
    this is the line 42 in the nginx.conf
    Code:
    index  index.php index.html index.htm;
        include       mime.types;
        default_type  application/octet-stream;
        charset utf-8; <<--- this one
    
    if i remove pagespeed support the error is gone so what could be the issue and thanks.

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,424
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,839
    Local Time:
    1:54 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    wow that's a weird one

    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:
    NGINX_PAGESPEED=y
    and then recompile Nginx 1.11.2 or higher via centmin.sh menu option 4

    To troubleshoot, you need to check the the nginx upgrade log at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the initial install log. You can see full details at How to troubleshoot Centmin Mod initial install issues

    also what's output of
    Code (Text):
    nginx -t

    when you run centmin.sh menu option 4 there's a nginx upgrade log timestamped at /root/centminlogs

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest nginx_upgrade log to gist.github.com or pastebin.com

    You'll need to post on the forums with the following info
    • Server or VPS details ? XEN, KVM, OpenVZ, VMWare or dedicated server ? OS ? CentOS 6.7 or 7.2 ? 32bit or 64bit ?
    • What version of Centmin Mod ? .07 stable or 08 stable or .09 beta01 or another branch version ?
    • Was it fresh install or upgrade ?
    • Method of install ? Via centmin.sh menu option 1, Git install or curl one liner install as outlined at centminmod.com/download.html ?
    • How long ago did you install Centmin Mod ?
    • There's numerous code changes, bug fixes over time, so ensure you have latest Centmin Mod code installed by upgrading your Centmin Mod code as instructed below.
     
  3. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    4:54 AM
    1.7.5
    5.5
    Alright thank you.