Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

how connfig REDIS cache with q2a

+4 votes
110 views
asked Oct 14, 2016 in Q2A Core by smohamadi
how connfig REDIS cache with q2a
Q2A version: 1.7.4

1 Answer

+2 votes
answered Feb 23 by moha16
selected Feb 24 by smohamadi
 
Best answer
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=my_zone:10m inactive=60m;
       proxy_cache_key "$scheme$request_method$host$request_uri";

add fastcgi conf

                location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                fastcgi_intercept_errors on;
                fastcgi_ignore_client_abort off;
                fastcgi_connect_timeout 60;
                fastcgi_send_timeout 180;
                fastcgi_read_timeout 180;
                fastcgi_buffer_size 128k;
                fastcgi_buffers 4 256k;
                fastcgi_busy_buffers_size 256k;
                fastcgi_temp_file_write_size 256k;
    }
commented Feb 23 by moha16
add_header X-Fastcgi-Cache $upstream_cache_status;
        add_header rt-Fastcgi-Cache $upstream_cache_status;
...