worker_processes  1;
worker_rlimit_nofile 65535; #务必先修改服务器的max open files 数。

error_log  /data/fastdfs_data/logs/nginx-error.log;

events {
  use epoll; #服务器若是Linux 2.6+，你应该使用epoll。
  worker_connections 65535;
}

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  /data/fastdfs_data/logs/nginx-access.log  main;
    sendfile        on;
    keepalive_timeout  65;
    
    gzip on;
    gzip_min_length 2k;
    gzip_buffers 8 32k;
    gzip_http_version 1.1;
    gzip_comp_level 2;
    gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
    gzip_vary on;

    include /usr/local/nginx/conf.d/*.conf;

}
