Nginx does not start with the following error:
CONFIG_TEXT: nginx: [emerg] "fastcgi_cache" zone "microcache" is unknown in /etc/nginx/nginx.conf:41 nginx: configuration file /etc/nginx/nginx.conf test failed
fastcgi_cache is set for a domain but not set in
Log in to Plesk server using SSH.
Add the following in
multi_accept on; #The option multi_accept makes the worker process accept all new connections instead of serving on at a time:
open_file_cache max=2000 inactive=20s; # This configuration block tells the server to cache 2000 open filehandles, closing handles that have no hits for 20 seconds.
open_file_cache_valid 60s; # The cached handles are considered valid for 60 seconds, and only files that were accessed five times will be considered suitable for caching.
open_file_cache_min_uses 5; # The net result should be that frequently accessed files have handles cached for them, which will cut down on filesystem accesses.
fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:10m max_size=1000m inactive=60m; # Further configuration can be done on a vhost level to cache fastcgi/php results
Re-enable the nginx support with the commands:
# /usr/local/psa/admin/bin/nginxmng -d
# /usr/local/psa/admin/bin/nginxmng -e