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

Test thread (large image attachments)

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

  1. Matt

    Matt Moderator Staff Member

    862
    387
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +606
    Local Time:
    6:25 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:
    1:25 AM
    Thanks, Matt!
     
  3. Amin Sabet

    Amin Sabet Member

    49
    7
    8
    Nov 8, 2015
    Ratings:
    +14
    Local Time:
    1:25 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:
    1:25 AM
  5. eva2000

    eva2000 Administrator Staff Member

    45,406
    10,302
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,980
    Local Time:
    3:25 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:
    1:25 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

    45,406
    10,302
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,980
    Local Time:
    3:25 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x