用tmpfs加速nginx
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;
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.