用tmpfs加速nginx

2008-04-12 | 10:52 am分类:WEB, 工作日志, 系统管理 | 90 views

mkdir /nginx_tmp
编辑/etc/fstab,加入

tmpfs                   /nginx_tmp              tmpfs   size=1024m,mode=1777        0 0

编辑/usr/local/nginx/conf/nginx.conf,将缓存目录均指向/nginx_tmp

client_body_temp_path      /nginx_tmp/client_body_temp;
proxy_temp_path            /nginx_tmp/proxy_temp;
fastcgi_temp_path          /nginx_tmp/fastcgi_temp;

此分区可视情况适当调整大小,此处设置为1G

Sorry, comments for this entry are closed at this time.