Nginx configuration error, Google again and again, that is, there are no similar errors and solutions... this error is really amazing. Can you help me see what is going on?

Source: Internet
Author: User
Tags sendfile
The nginx configuration file is as follows: {code...} the following error message is returned when testing Nginx: {code ...} The nginx configuration file is as follows:

worker_processes  1;worker_rlimit_nofile  65535;#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;error_log  logs/error.log  crit; pid  logs/nginx.pid;events {  worker_connections  65535;  multi_accept  on;  use  epoll;}http {  include  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  logs/access.log  main;  access_log  off;  server_tokens  off;  sendfile  on;  tcp_nopush  on;  tcp_nodelay  on;  #keepalive_timeout  0;  keepalive_timeout  10;  client_header_timeout  10;   client_body_timeout  10;   reset_timedout_connection  on;   send_timeout  10;   gzip  on;  gzip_min_length  1024;  gzip_buffers  4 16k;  #gzip_http_version  1.1;  gzip_comp_level  2;  fastcgi_cache_path  /usr/local/nginx/fastcgi_cache levels=1:2 keys_zone=TEST:10m inactive=5m;  fastcgi_connect_timeout  300;  fastcgi_send_timeout  300;  fastcgi_read_timeout  300;  fastcgi_buffer_size  64k;  fastcgi_buffers  4 64k;  fastcgi_busy_buffers_size  128k;  fastcgi_temp_file_write_size  128k;  fastcgi_cache  TEST;  fastcgi_cache_valid  200 302 1h;  fastcgi_cache_valid  301 1d;  fastcgi_cache_valid  any 1m;  server_names_hash_bucket_size  128;  client_header_buffer_size  32k;  large_client_header_buffers  4 32k;  client_max_body_size  8m;  server {    listen  80 default;    server_name  _;    return  403;  }  include /usr/local/nginx/conf/vhosts/*.conf;

The following error message is displayed after testing Nginx:

[root@test conf]# /usr/local/nginx/sbin/nginx -tnginx: [emerg] unknown directive "fastcgi_cache_path" in /usr/local/nginx/conf/nginx.conf:46nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

Reply content:

The nginx configuration file is as follows:

worker_processes  1;worker_rlimit_nofile  65535;#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;error_log  logs/error.log  crit; pid  logs/nginx.pid;events {  worker_connections  65535;  multi_accept  on;  use  epoll;}http {  include  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  logs/access.log  main;  access_log  off;  server_tokens  off;  sendfile  on;  tcp_nopush  on;  tcp_nodelay  on;  #keepalive_timeout  0;  keepalive_timeout  10;  client_header_timeout  10;   client_body_timeout  10;   reset_timedout_connection  on;   send_timeout  10;   gzip  on;  gzip_min_length  1024;  gzip_buffers  4 16k;  #gzip_http_version  1.1;  gzip_comp_level  2;  fastcgi_cache_path  /usr/local/nginx/fastcgi_cache levels=1:2 keys_zone=TEST:10m inactive=5m;  fastcgi_connect_timeout  300;  fastcgi_send_timeout  300;  fastcgi_read_timeout  300;  fastcgi_buffer_size  64k;  fastcgi_buffers  4 64k;  fastcgi_busy_buffers_size  128k;  fastcgi_temp_file_write_size  128k;  fastcgi_cache  TEST;  fastcgi_cache_valid  200 302 1h;  fastcgi_cache_valid  301 1d;  fastcgi_cache_valid  any 1m;  server_names_hash_bucket_size  128;  client_header_buffer_size  32k;  large_client_header_buffers  4 32k;  client_max_body_size  8m;  server {    listen  80 default;    server_name  _;    return  403;  }  include /usr/local/nginx/conf/vhosts/*.conf;

The following error message is displayed after testing Nginx:

[root@test conf]# /usr/local/nginx/sbin/nginx -tnginx: [emerg] unknown directive "fastcgi_cache_path" in /usr/local/nginx/conf/nginx.conf:46nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

How did you install nginx? How did you set configure?http_fastcgi_moduleModule Not Installed
Check if the output is sent to without by nginx-V.

Update:
Fastcgi_cache is available when -- with-http-cache is enabled in the subject test.

In addition, the Nginx version is 1.6.3 and the latest stable version.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.