Wrong permissions /var/log/pagespeed + console (ngx_pagespeed with Redis)

124 views
Skip to first unread message

Markus W.

unread,
Sep 17, 2017, 12:27:09 PM9/17/17
to ngx-pagespeed-discuss
Hi at all,
thanks for this amazing software first. I use it on Plesk webhosting edition.
I installed ngx_pagespeed 1.12.34.2 by source and compiled by an extra (replaced Plesk-) nginx/1.13.2, built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4), built with OpenSSL 1.0.2l.
First I used normal file cache. ngx_pagespeed working fine. Yesterday I first installed Redis built-in by Ubuntu as root, (afterwards also another instance Redis by Redis homepage, but this seems no problem). Pagespeed is also working but with only little problems.
- I have two errors about wrong permission one about /var/cache/pagespeed. I gave pagespeed directory nginx:nginx 755 and first error was away.
- But I realized that /var/log/pagespeed is totally empty and I think it leads to same problem: But which permissions do I have to give pagespeed in /var/log/?
In this case I'm unsure, would be possible to set probably Redis as owner and which permission???
- My second question is that I have no access to console, perhaps also a permission problem. I must say that I use pagespeed admin since yesterday.

Would be great to know the permissions and owner of /var/log/pagespeed and why v3 and !clean!time! are not created (with Redis usage). I also tried to changed the FileCache Path from

    pagespeed FileCachePath /var/ngx_pagespeed_cache;
to

    pagespeed FileCachePath /var/cache/pagespeed;
 
But no success, subfolders were not created.



Here is my pagespeed admin: https://www.chattergallery.com/pagespeed_admin


Here is my whole /etc/nginx/nginx.conf

Code hier einge
#user  nginx;
worker_processes  
1;

#error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

#pid        /var/run/nginx.pid;

include
/etc/nginx/modules.conf.d/*.conf;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    #tcp_nodelay        on;

    #gzip  on;
    #gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    server_tokens off;
   
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    proxy_busy_buffers_size 256k;

    open_file_cache max=2000 inactive=20s;
    open_file_cache_valid 60s;
    open_file_cache_min_uses 5;
    open_file_cache_errors off;

    pagespeed on;
    pagespeed RedisServer "localhost:6379";
    pagespeed LRUCacheKbPerProcess     8192;
    pagespeed LRUCacheByteLimit        16384;
    pagespeed CreateSharedMemoryMetadataCache "/var/cache/pagespeed/" 51200;

   
# Needs to exist and be writable by nginx.  Use tmpfs for best performance.
    pagespeed FileCachePath /var/ngx_pagespeed_cache;
    pagespeed EnableFilters combine_css,combine_javascript;
    pagespeed LowercaseHtmlNames on;
    pagespeed XHeaderValue "Powered by ngx_pagespeed and Plesk";
    pagespeed StaticAssetPrefix /static/;
    pagespeed PreserveUrlRelativity on;
    pagespeed EnableFilters make_show_ads_async;
    pagespeed EnableFilters combine_css,rewrite_css,move_css_above_scripts,combine_javascript,rewrite_javascript;
    pagespeed EnableFilters lazyload_images,inline_preview_images,resize_mobile_images,inline_google_font_css,rewrite_style_attributes;
    pagespeed EnableFilters prioritize_critical_css,make_google_analytics_async,outline_css,outline_javascript,move_css_to_head;
    pagespeed EnableFilters include_js_source_maps,canonicalize_javascript_libraries,local_storage_cache,convert_to_webp_lossless,insert_image_dimensions;
    pagespeed EnableFilters elide_attributes,extend_cache_pdfs,sprite_images,trim_urls,pedantic;
    pagespeed EnableFilters remove_quotes,dedup_inlined_images,insert_dns_prefetch,remove_comments,collapse_whitespace;
    pagespeed EnableFilters in_place_optimize_for_browser;

    pagespeed StatisticsPath /ngx_pagespeed_statistics;
    pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
    pagespeed MessagesPath /ngx_pagespeed_message;
    pagespeed ConsolePath /pagespeed_console;
    pagespeed AdminPath /pagespeed_admin;
    pagespeed GlobalAdminPath /pagespeed_global_admin;
    pagespeed UsePerVhostStatistics on;
    pagespeed MessageBufferSize 100000;
    pagespeed EnableCachePurge on;

    pagespeed Statistics on;
    pagespeed StatisticsLogging on;
    pagespeed LogDir /var/log/pagespeed;
    pagespeed AdminPath /pagespeed_admin;

    pagespeed FileCachePath              "/var/cache/pagespeed/";
    pagespeed FileCacheSizeKb            102400;
    pagespeed FileCacheCleanIntervalMs   3600000;
    pagespeed FileCacheInodeLimit        500000;
 
    # BEGIN Google brotli - definitions, tuned by UFHH01
    brotli on;
    brotli_static on;
    brotli_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml image/gif image/jpeg application/atom+xml application/javascript image/png image/tiff image/x-ms-bmp application/font-woff application/json application/msword application/pdf application/postscript application/rtf application/vnd.apple.mpegurl application/vnd.ms-excel application/vnd.ms-fontobject application/vnd.ms-powerpoint application/vnd.wap.wmlc application/vnd.google-earth.kml+xml application/vnd.google-earth.kmz application/x-7z-compressed application/x-cocoa application/x-java-archive-diff application/x-perl application/x-rar-compressed application/x-shockwave-flash application/x-tcl application/x-x509-ca-cert application/xhtml+xml application/xspf+xml application/zip application/octet-stream audio/midi audio/mpeg audio/ogg audio/x-m4a audio/x-realaudio video/3gpp video/mp2t video/mp4 video/mpeg video/quicktime video/webm video/x-flv video/x-m4v video/x-mng video/x-ms-asf video/x-ms-wmv video/x-msvideo;
    brotli_comp_level 8;
    # END Google brotli - definitions, tuned by UFHH01

    # BEGIN gzip - Definitions, tuned by UFHH01
    gzip_static on;
    gzip on;
    gzip_proxied any;
    gzip_http_version 1.1;
    gzip_min_length 100;
    gzip_vary on;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml image/gif image/jpeg application/atom+xml application/javascript image/png image/tiff image/x-ms-bmp application/font-woff application/json application/msword application/pdf application/postscript application/rtf application/vnd.apple.mpegurl application/vnd.ms-excel application/vnd.ms-fontobject application/vnd.ms-powerpoint application/vnd.wap.wmlc application/vnd.google-earth.kml+xml application/vnd.google-earth.kmz application/x-7z-compressed application/x-cocoa application/x-java-archive-diff application/x-perl application/x-rar-compressed application/x-shockwave-flash application/x-tcl application/x-x509-ca-cert application/xhtml+xml application/xspf+xml application/zip application/octet-stream audio/midi audio/mpeg audio/ogg audio/x-m4a audio/x-realaudio video/3gpp video/mp2t video/mp4 video/mpeg video/quicktime video/webm video/x-flv video/x-m4v video/x-mng video/x-ms-asf video/x-ms-wmv video/x-msvideo;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
    # END gzip - Definitions, tuned by UFHH01

    include /etc/nginx/conf.d/*.conf;
}

# override global parameters e.g. worker_rlimit_nofile
include /etc/nginx/*global_params;
ben...


 Lots of greets





Otto van der Schaaf

unread,
Sep 17, 2017, 1:53:53 PM9/17/17
to ngx-pagesp...@googlegroups.com
Please see inline!


On Sun, Sep 17, 2017, 18:27 Markus W. <dukema...@gmail.com> wrote:
Hi at all,
thanks for this amazing software first. I use it on Plesk webhosting edition.
I installed ngx_pagespeed 1.12.34.2 by source and compiled by an extra (replaced Plesk-) nginx/1.13.2, built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4), built with OpenSSL 1.0.2l.
First I used normal file cache. ngx_pagespeed working fine. Yesterday I first installed Redis built-in by Ubuntu as root, (afterwards also another instance Redis by Redis homepage, but this seems no problem). Pagespeed is also working but with only little problems.
- I have two errors about wrong permission one about /var/cache/pagespeed. I gave pagespeed directory nginx:nginx 755 and first error was away.
- But I realized that /var/log/pagespeed is totally empty and I think it leads to same problem: But which permissions do I have to give pagespeed in /var/log/?

Files should show up upon enabling statistics logging: https://www.modpagespeed.com/doc/console

In this case I'm unsure, would be possible to set probably Redis as owner and which permission???
- My second question is that I have no access to console, perhaps also a permission problem. I must say that I use pagespeed admin since yesterday.

You probably need to enable statistics logging.


Would be great to know the permissions and owner of /var/log/pagespeed and why v3 and !clean!time! are not created (with Redis usage). I also tried to changed the FileCache Path from

    pagespeed FileCachePath /var/ngx_pagespeed_cache;
to

    pagespeed FileCachePath /var/cache/pagespeed;
 
But no success, subfolders were not created.


I think this is expected behavior with redis as a caching backend.

--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages