nginx.confファイルの内容は次のとおりです。
http {
include mime.types;
default_type application/octet-stream;
# configure cache log
log_format cache '$remote_addr - $host [$time_local] '
'"$request" $status $upstream_cache_status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
fastcgi_cache_path /data0/nginx-cache levels=1:2
keys_zone=nginx_fastcgi_cache:1m
inactive=1d;
fastcgi_temp_path /data0/nginx-cache/temp;
server {
listen 8080;
server_name outofmemory.cn localhost;
access_log /data0/nginx-1.2.6/logs/cache.log cache;
#charset koi8-r;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache nginx_fastcgi_cache;
fastcgi_cache_min_uses 1;
fastcgi_ignore_headers Cache-Control Expires;
fastcgi_cache_use_stale error timeout invalid_header http_500;
#add_header X-Cache cached;
fastcgi_cache_valid 60m;
location / {
root /www/outofmemory.cn;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_pass 127.0.0.1:9002;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache nginx_fastcgi_cache;
fastcgi_cache_valid 60m;
}
}
}
どんな助けでもいただければ幸いです。
ありがとう。