Hello
1- I have aapanel and nginx from the latest version. I installed WordPress with aa panel and nginx help is also installed. Do I need to enter the below code to activate the cache?
nginx 1.24
php 7.4
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_path /dev/shm/fastcgi-cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;
fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
2- Yesterday I received this error and nginx stopped working. After deleting the file, the problem was solved and I returned the file again. You know what was the reason.
ERROR:
nginx: [emerg] "fastcgi_cache_key" directive is duplicate in /www/server/panel/vhost/nginx/domain.com.conf:1
nginx: configuration file /www/server/nginx/conf/nginx.conf test failed
Maybe because I had entered my site both with www and without www
tank 🙏🙏🙏