Join the community today
Register Now

Test thread (large image attachments)

Discussion in 'Testing Forum' started by Amin Sabet, Dec 5, 2016.

  1. Matt

    Matt Well-Known Member

    867
    393
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +613
    Local Time:
    11:28 AM
    1.5.15
    MariaDB 10.2
    It's back on.

     
  2. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    6:28 AM
    Thanks, Matt!
     
  3. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    6:28 AM
    I made a few changes (shown in orange) to /usr/local/nginx/conf/nginx.conf

    Hard to tell on my speedy home internet connection, but I think they are helping. I disabled the CDN on my site, and there have been no complaints so far :)

    Code:
    events {
        worker_connections  8192;
        accept_mutex off;
        use epoll;
        multi_accept on;
    }
    
    http {
     aio threads;
     pagespeed ImageMaxRewritesAtOnce -1;
     map_hash_bucket_size 128;
     map_hash_max_size 4096;
     server_names_hash_bucket_size 128;
     server_names_hash_max_size 2048;
    
    #limit_req_zone $binary_remote_addr zone=xwplogin:16m rate=40r/m;
    #limit_conn_zone $binary_remote_addr zone=xwpconlimit:16m;
    
    more_set_headers "Server: nginx centminmod";
    more_set_headers "X-Powered-By: centminmod";
    
    include /usr/local/nginx/conf/vts_http.conf;
    include /usr/local/nginx/conf/geoip.conf;
    include /usr/local/nginx/conf/maintenance.conf;
    
    include /usr/local/nginx/conf/pagespeedadmin.conf;
    include /usr/local/nginx/conf/fastcgi_param_https_map.conf;
    
    log_format      main    '$remote_addr - $remote_user [$time_local] $request '
                    '"$status" $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for" "$gzip_ratio"'
                    ' "$connection" "$connection_requests" "$request_time"';
    
    error_log   logs/error.log error;
    
        index  index.php index.html index.htm;
        include       mime.types;
        default_type  application/octet-stream;
        charset utf-8;
    
            access_log off;
            sendfile on;
            sendfile_max_chunk 512k;
            tcp_nopush  on;
            tcp_nodelay on;
            server_tokens off;
            server_name_in_redirect off;
    
            keepalive_timeout  60;
            keepalive_requests 1000;
    
    
    Also, ngx_pagespeed seems to be nicely optimizing my image attachments (converting to webp, etc) even though they don't end in an image extension.
     
    Last edited: Dec 6, 2016
  4. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    6:28 AM
  5. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    8:28 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    that goes in nginx.conf include file /usr/local/nginx/conf/pagespeedadmin.conf - command shortcut to open that file in nano text editor = pscontrol admin

    that option is set to 8 by default Image Filter and Option Reference  |  PageSpeed Module  |  Google Developers

    definitely better !
     
  6. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    6:28 AM
    Is there any chance that if I use that addon to move attachments to data folder that I would be unable to move them back if necessary at a later date?
     
  7. eva2000

    eva2000 Administrator Staff Member

    46,851
    10,627
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,493
    Local Time:
    8:28 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x