重启lnmp时,出现这样的错误提示:- : unknown directive "gzip_static" in /usr/local/nginx/conf/wordpress_params_supercache.conf:4

  • configuration file /usr/local/nginx/conf/nginx.conf test failed复制代码这个该怎么处理啊?

/usr/local/nginx/conf/wordpress_params_supercache.conf文件的代码如下:- location /

  • {
  • autoindex off;
  • gzip_static on;
  • set $wp_super_cache_file ”;
  • set $wp_super_cache_uri $request_uri;
  • if ( $request_method = POST )
  • {
  • set $wp_super_cache_uri ”;
  • }
  • if ( $query_string )
  • {
  • set $wp_super_cache_uri ”;
  • }
  • if ( $http_cookie ~* “comment_author_|wordpress|wp-postpass_” )
  • {
  • set $wp_super_cache_uri ”;
  • }
  • if ( $wp_super_cache_uri ~ ^(.+)$ )
  • {
  • set $wp_super_cache_file /wp-content/cache/wp_super_cache/$http_host/$1index.html;
  • }
  • if ( -f $document_root$wp_super_cache_file )
  • {
  • rewrite ^(.*)$ $wp_super_cache_file break;
  • }
  • if (-f $request_filename)
  • {
  • expires 30d;
  • break;
  • }
  • if (!-e $request_filename)
  • {
  • rewrite ^(.+)$ /index.php?q=$1 last;
  • }
  • }复制代码