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 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-default; server_name _; return 403; } include/usr/local/nginx/conf/vhosts/*.conf;
The test nginx gets the following error message:
[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 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-default; server_name _; return 403; } include/usr/local/nginx/conf/vhosts/*.conf;
The test nginx gets the following error message:
[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 the Nginx AH configure how to set the total feel of your http_fastcgi_module
module is not installed
You nginx-v see if the output gave him to without.
Update:
Fastcgi_cache available when--with-http-cache is turned on by the main test
To add, the Nginx version is 1.6.3, the latest stable version