How to fix nginx: unknown directive "fastcgi_cache_purge"?

Transfer your VPS from one host to another. Configuring servers collide very rarely. Set up, works - forgotten. The server is used as a host WordPress sites. Server configuration: nginx + php-fpm + mysql. Also used fastcgi_cache. But the new server has installed the whole set ON, moved the configs from the old, started, and nginx does not start, complains nginx: [emerg] unknown directive "fastcgi_cache_purge" in /etc/nginx/sites-enabled/site.EN:78.
On the old server is nginx 1.4.1, but the new 1.10.1. Don't know if it matters, but on the new server installed PHP7, write that there are performance gains with nginx configs updated for PHP7.
In the nginx documentation for the Directive is fastcgi_cache_purge PostScript "functionality is available as part of our commercial subscription." Is this it? Ie now without buying a subscription with NGINX I can't do anything?

user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/;

events {
 worker_connections 768;

http {
 include /etc/nginx/mime.types;
 default_type application/octet-stream;

 "log_format" main '$remote_addr - $remote_user [$time_local] "$request" '
 '$status $body_bytes_sent "$http_referer" '
 '"$http_user_agent" "$http_x_forwarded_for"';

 access_log /var/log/nginx/access.log main;

 sendfile on;
 tcp_nopush on;

 client_max_body_size 20M;

 tcp_nodelay on;
 keepalive_timeout 65;
 types_hash_max_size 2048;
 server_tokens off;

 #Limit Request
 limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
 limit_req_status 444; 

 server_names_hash_bucket_size 64;

 #Gzip settings
 gzip on;
 "gzip_disable" "msie6";
 gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
 #gzip_vary on;
 gzip_proxied any;
 gzip_min_length 1100;
 gzip_comp_level 3;
 gzip_buffers 16 8k;
 gzip_http_version 1.0;
 #gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

 #Wordpress Cache
 fastcgi_cache_path /home/server/nginx-cache levels=1:2 keys_zone=WORDPRESS:10m inactive=30m; 
 fastcgi_cache_key "$scheme$request_method$host$request_uri";
 fastcgi_cache_use_stale error timeout invalid_header are http_500; 

# include /etc/nginx/conf.d/*.conf;
 include /etc/nginx/sites-enabled/*;

virtual host conf:
server {
 listen 80; 

 root /home/server/htdocs/;

 access_log /home/server/logs/;
 error_log /home/server/logs/;
 index index.php index.html index.htm;

 location ~ \wp-login.php {
 auth_basic "Unauthorized";
 auth_basic_user_file /home/server/.htpasswd;
 #deny all;
 location unix:/run/php/php7.0-fpm.sock;
 include fastcgi_params;

 #Enable Browser Cache
 location ~* \.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {
 access_log off; 
 expires 30d;
 #add_header Pragma public;
 #add_header Cache-Control "public, must-revalidate, proxy-revalidate";

 #Block HotLink
 location ~ \.(jpeg|png|gif|jpg)$ {
 "valid_referers" none blocked *;
 if ($invalid_referer) {
 return 403;

 error_page 404 /404.html;
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root /etc/nginx/error;

 #Nginx Helper

 set $skip_cache 0;

 # POST requests and urls with a query string should always go to PHP
 if ($request_method = POST) {
 set $skip_cache 1;
 if ($query_string != "") {
 set $skip_cache 1;

 # Don't cache uris containing the following segments
 if ($request_uri ~ * "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
 set $skip_cache 1;

 # Don't use the cache for logged in users or recent commenters
 if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
 set $skip_cache 1;

 location ~ .php$ {
 try_files $uri =404; 
 include fastcgi_params;
 location unix://run/php/php7.0-fpm.sock;
 fastcgi_cache_bypass $skip_cache;
 fastcgi_no_cache $skip_cache;
 fastcgi_index index.php;
 fastcgi_cache WORDPRESS;
 fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
 fastcgi_cache_valid 200 301 202 404 60m;

 location ~ /purge(/.*) {
 fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";

 location / {
 try_files $uri $uri/ /index.php?$args;
 location = /favicon.ico {
 log_not_found off;
 access_log off;
 location = /robots.txt {
 allow all;
 log_not_found off;
 access_log off;
 location ~ /\. {
 deny all;
 location ~* /(?:uploads|files/)/.*\.php$ {
 deny all;

 rewrite /wp-admin$ $scheme://$host$uri/ permanent;

July 8th 19 at 16:26
2 answers
July 8th 19 at 16:28
Yes. Exactly. This functionality is only available in the paid version. How would the developers of nginx also want to earn.
The old version can be collected with a free module
He gave such functionality.
Just before this module was free, like they sold only support. And now it turns out was paid. There are options to collect the nginx version 1.9 where is this module, but I don't know if it's valid will be the decision from the point of view of security. As I understand it, nginx plus is worth $ 1,900 a year, frankly, is impossible for several non-profit wordpress sites. - santina90 commented on July 8th 19 at 16:31
Specified by the link module and is now free. Just the stability of nginx when it is built is not guaranteed. But that was before. - lennie.Beatty commented on July 8th 19 at 16:34
July 8th 19 at 16:30
Until I see the one you have specified a area WORDPRES and WORDPRESS query
Could not find specified error, ran a search on configu, anywhere WORDPRESS, could you be more specific to specify exactly where I have mistake? In the old configuration this configuration worked successfully. - santina90 commented on July 8th 19 at 16:33
: and not here by accident configs took? if Yes, then this rap is compiled without these modules

Use only proven turnips - lennie.Beatty commented on July 8th 19 at 16:36
I'm your config was set up, everything works - santina90 commented on July 8th 19 at 16:39
: currently connected to the official repository, the server was set up 3 years ago, even I do not remember whence took. Saw the article you sent, but didn't want to do there, did not like the repository. - Magdalena.Wym commented on July 8th 19 at 16:42
: what's your version of nginx? - Magdalena.Wym commented on July 8th 19 at 16:45
: Just checked, was wrong much. I have 1.4.6 installed on Ubuntu by default there is a check passed without errors. 1.11 do not work this module. - santina90 commented on July 8th 19 at 16:48

Find more questions by tags Nginx