Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx PageSpeed nginx: [emerg] unknown directive "pagespeed" in /usr/local/nginx/conf/pagespeedadmin.conf:5

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

  1. rdan

    rdan Premium Member Premium Member

    4,219
    1,027
    113
    May 25, 2014
    Ratings:
    +1,466
    Local Time:
    5:57 AM
    Mainline
    10.2

    My pagespeedadmin.conf content.

    can be ignored?
     
  2. eva2000

    eva2000 Administrator Staff Member

    35,043
    7,734
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,928
    Local Time:
    7:57 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  3. rdan

    rdan Premium Member Premium Member

    4,219
    1,027
    113
    May 25, 2014
    Ratings:
    +1,466
    Local Time:
    5:57 AM
    Mainline
    10.2
    Using latest .07 zip.
    Last time I have disable pagespeed and enable it again now, then run nginx upgrade to install ngx_pagespeed.
     
  4. eva2000

    eva2000 Administrator Staff Member

    35,043
    7,734
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,928
    Local Time:
    7:57 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    double checked the centmin.sh you used has NGINX_PAGESPEED=y ?

    what does your /usr/local/src directory look like and alias for centmin command via

    Code:
    ls -lah /usr/local/src
    alias
    if you used beta version from github, the alias location for centmin.sh differs from stable or zip downloads, so running shortcut centmin could call the older centmin.sh
     
  5. rdan

    rdan Premium Member Premium Member

    4,219
    1,027
    113
    May 25, 2014
    Ratings:
    +1,466
    Local Time:
    5:57 AM
    Mainline
    10.2
    Yes.
    using the latest zip on download site not from github.
     
  6. rdan

    rdan Premium Member Premium Member

    4,219
    1,027
    113
    May 25, 2014
    Ratings:
    +1,466
    Local Time:
    5:57 AM
    Mainline
    10.2
    I just re install/upgrade nginx via menu 4 and got this:
    Code:
    make[1]: Leaving directory `/svr-setup/nginx-1.7.2'
    
    real    0m39.348s
    user    0m27.043s
    sys     0m5.008s
    *************************************************
    
    Thu Jul  3 18:07:58 PHT 2014
    Success: Nginx make ok
    
    *************************************************
    nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
    
    nginx seems to be still running, trying to stop it again...
    
    make -f objs/Makefile install
    make[1]: Entering directory `/svr-setup/nginx-1.7.2'
    test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx'
    test -d '/usr/local/sbin'               || mkdir -p '/usr/local/sbin'
    test ! -f '/usr/local/sbin/nginx'               || mv '/usr/local/sbin/nginx'                   '/usr/local/sbin/nginx.old'
    cp objs/nginx '/usr/local/sbin/nginx'
    test -d '/usr/local/nginx/conf'                 || mkdir -p '/usr/local/nginx/conf'
    cp conf/koi-win '/usr/local/nginx/conf'
    cp conf/koi-utf '/usr/local/nginx/conf'
    cp conf/win-utf '/usr/local/nginx/conf'
    test -f '/usr/local/nginx/conf/mime.types'              || cp conf/mime.types '/usr/local/nginx/conf'
    cp conf/mime.types '/usr/local/nginx/conf/mime.types.default'
    test -f '/usr/local/nginx/conf/fastcgi_params'          || cp conf/fastcgi_params '/usr/local/nginx/conf'
    cp conf/fastcgi_params          '/usr/local/nginx/conf/fastcgi_params.default'
    test -f '/usr/local/nginx/conf/fastcgi.conf'            || cp conf/fastcgi.conf '/usr/local/nginx/conf'
    cp conf/fastcgi.conf '/usr/local/nginx/conf/fastcgi.conf.default'
    test -f '/usr/local/nginx/conf/uwsgi_params'            || cp conf/uwsgi_params '/usr/local/nginx/conf'
    cp conf/uwsgi_params            '/usr/local/nginx/conf/uwsgi_params.default'
    test -f '/usr/local/nginx/conf/scgi_params'             || cp conf/scgi_params '/usr/local/nginx/conf'
    cp conf/scgi_params             '/usr/local/nginx/conf/scgi_params.default'
    test -f '/usr/local/nginx/conf/nginx.conf'              || cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf'
    cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf.default'
    test -d '/usr/local/nginx/logs'                 || mkdir -p '/usr/local/nginx/logs'
    test -d '/usr/local/nginx/logs' ||              mkdir -p '/usr/local/nginx/logs'
    test -d '/usr/local/nginx/html'                 || cp -R html '/usr/local/nginx'
    test -d '/usr/local/nginx/logs' ||              mkdir -p '/usr/local/nginx/logs'
    make[1]: Leaving directory `/svr-setup/nginx-1.7.2'
    
    real    0m0.049s
    user    0m0.016s
    sys     0m0.014s
    *************************************************
    
    Thu Jul  3 18:08:05 PHT 2014
    Success: Nginx was installed properly
    
    *************************************************
    *************************************************
    * nginx updated
    *************************************************
    
    Code:
    # nginx -V
    nginx version: nginx/1.7.2
    built by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
    TLS SNI support enabled
    configure arguments: --with-cc-opt='-I/svr-setup/staticlibssl/include -I/usr/include' --with-ld-opt='-L/svr-setup/staticlibssl/lib -Wl,-rpath -lssl -lcrypto -ldl -lz' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module --with-http_secure_link_module --with-http_flv_module --with-http_realip_module --with-openssl-opt=enable-tlsext --add-module=../ngx-fancyindex-ngx-fancyindex --add-module=../ngx_cache_purge-2.1 --add-module=../headers-more-nginx-module-0.25 --add-module=../nginx-accesskey-2.0.3 --add-module=../nginx-http-concat-master --with-http_dav_module --add-module=../nginx-dav-ext-module-0.0.3 --with-openssl=../openssl-1.0.1h --with-libatomic --with-pcre=../pcre-8.35 --with-pcre-jit --with-http_spdy_module --add-module=../ngx_pagespeed-release-1.8.31.4-beta
    
    Looks fine.
     
  7. eva2000

    eva2000 Administrator Staff Member

    35,043
    7,734
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,928
    Local Time:
    7:57 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    oh check to see if your pagespeed.conf contents is the same as it could of been overwritten with pagespeed off

    if it has most likely during Nginx upgrade and you can find your own pre-Nginx upgrade auto backed up pagespeed.conf in /usr/local/nginx/conf

    Code:
    ls -lahrt /usr/local/nginx/conf | grep pagespeed.conf
    -rw-r--r-- 1 root root 5.7K May 23 16:08 pagespeed.conf_240514-022702
    -rw-r--r-- 1 root root 7.1K May 27 06:31 pagespeed.conf_280514-005423
    -rw-r--r-- 1 root root 7.3K Jun  2 05:22 pagespeed.conf_030614-011216
    -rw-r--r-- 1 root root 7.6K Jun  4 18:22 pagespeed.conf_050614-184815
    -rw-r--r-- 1 root root 7.7K Jun  8 03:30 pagespeed.conf_270614-111001
    -rw-r--r-- 1 root root 7.7K Jun  8 03:30 pagespeed.conf_180614-164744
    -rw-r--r-- 1 root root 7.7K Jun  8 03:30 pagespeed.conf_180614-164237
    -rw-r--r-- 1 root root 8.1K Jul  3 09:23 pagespeed.conf
     
  8. eva2000

    eva2000 Administrator Staff Member

    35,043
    7,734
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,928
    Local Time:
    7:57 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    all that matters is

    Code:
    Thu Jul  3 18:08:05 PHT 2014
    Success: Nginx was installed properly
     
  9. rdan

    rdan Premium Member Premium Member

    4,219
    1,027
    113
    May 25, 2014
    Ratings:
    +1,466
    Local Time:
    5:57 AM
    Mainline
    10.2
    I know I got that status before but nginx is not running :D
    Good thing it's fix on the latest version :)
    Thanks!
     
  10. eva2000

    eva2000 Administrator Staff Member

    35,043
    7,734
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,928
    Local Time:
    7:57 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    so ngx_pagespeed running now ?
     
  11. rdan

    rdan Premium Member Premium Member

    4,219
    1,027
    113
    May 25, 2014
    Ratings:
    +1,466
    Local Time:
    5:57 AM
    Mainline
    10.2
    Yes, running fine but still i disable defer js for my ads :).
    But I have old problem that I don't know how to fix.
    I will create another thread for that :)
    Thanks!
     
..