• I configured Nginx according to the configuration requirements, and there is no error, but check the cache results, only the home page is cached, other pages are not cached, how to deal with this problem

    I am a user from China, using google translate

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jiangle2021

    (@jiangle2021)

    My server configuration is as follows:

    server {
        listen                     80;
        listen                     443 ssl http2;
        server_name                hd1080.pro;
        ssl_prefer_server_ciphers  on;
        ssl_ciphers                ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
        ssl_protocols              TLSv1 TLSv1.1 TLSv1.2;
        ssl_session_cache          shared:SSL:5m;
        ssl_session_timeout        5m;
        keepalive_timeout          75s;
        keepalive_requests         100;
    
        if ($scheme = http) {
            return  301 https://$host$request_uri;
        }
    
        gzip                       on;
        gzip_comp_level            6;
        gzip_min_length            1k;
        gzip_types                 text/plain text/css text/xml text/javascript text/x-component application/json application/javascript application/x-javascript application/xml application/xhtml+xml application/rss+xml application/atom+xml application/x-font-ttf application/vnd.ms-fontobject image/svg+xml image/x-icon font/opentype;
        brotli                     on;
        brotli_comp_level          6;
        brotli_min_length          1k;
        brotli_types               text/plain text/css text/xml text/javascript text/x-component application/json application/javascript application/x-javascript application/xml application/xhtml+xml application/rss+xml application/atom+xml application/x-font-ttf application/vnd.ms-fontobject image/svg+xml image/x-icon font/opentype;
        client_max_body_size       10M;
      
    ## GZIP
    gzip_static on;
    
    ## CHARSET
    charset utf-8;
    
    ## INDEX LOCATION
    location / {
      error_page 404 405 = @nocache;
    
      if ( $query_string ) {
    	return 405;
      }
      if ( $request_method = POST ) {
    	return 405;
      }
      if ( $request_uri ~ "/wp-" ) {
    	return 405;
      }
      if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
    	return 405;
      }
    
      default_type text/html;
      add_header X-Powered-By Cachify;
      set $memcached_key $host$uri;
      memcached_pass localhost:11211;
    }
    
    ## NOCACHE LOCATION
    location @nocache {
      index      index.html index.htm index.php;
      try_files $uri $uri/ /index.php?$args;
    }
      
        location ~ ^/.+\.php(/|$) {
            include                  conf.sitemgr.d/global/conf/fastcgi_params;
            fastcgi_index            index.php;
            fastcgi_param            SCRIPT_FILENAME 
            fastcgi_split_path_info  ^(.+\.php)(/.*)$;
            fastcgi_param            PATH_INFO $fastcgi_path_info;
            fastcgi_param            PATH_TRANSLATED $document_root$fastcgi_path_info;
            fastcgi_read_timeout     60s;
        }
    }
    • This reply was modified 2 years, 8 months ago by jiangle2021.

    When I use Nginx on my server, it seems like it is causing a problem with the cache plugin. The articles I wrote were displayed on the screen after cleaning the cache or after a while, but an error perception appeared in the troublesome Google performance query tool.

    two sites i tried

    https://www.andronova.net
    https://www.teknolojihaber.net

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only the first page is cached in Memcached mode’ is closed to new replies.