Fork me on GitHub

nginx 参数记录

log_format custom '$remote_addr - $remote_user [$time_local] '
'"$request" $status $request_time $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$request_body"';

access_log /var/log/nginx/access.log custom;

是对nginx日志做出格式 

 

 

gzip on;
gzip_min_length 5k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 4;
gzip_types text/plain application/x-javascript text/css application/xml application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";

 

设置gzip 并且重要的是gzip_types是指了ajax发送个格式

posted @ 2016-10-28 20:08  明天后浪  阅读(133)  评论(0)    收藏  举报