nginx.conf(centos6, 1.12)主配置文件修改
#nginx1.12 centos6.x
user admin admin;
worker_processes 4;
error_log /data/services/logs/nginx_error.log;
pid /data/services/run/nginx.pid;
worker_rlimit_nofile 65535;
events {
use epoll;
worker_connections 5120;
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 64;
#limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m;
log_format main '$http_x_forwarded_for - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$remote_addr" "host: $http_host" "$request_time" "$upstream_response_time" "$request_method"';
#access_log off;
access_log /data/services/logs/nginx_access.log main;
error_log /data/services/logs/nginx_error.log crit;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
charset utf-8,gbk;
#charset utf-8;
## Size Limits
large_client_header_buffers 8 12k;
client_body_buffer_size 32k;
client_header_buffer_size 8k;
client_max_body_size 200m;
## Timeouts
client_body_timeout 120s;
client_header_timeout 30s;
keepalive_timeout 120s;
send_timeout 120s;
## General Options
ignore_invalid_headers on;
#limit_req zone=one burst=5;
sendfile on;
server_name_in_redirect off;
server_tokens off;
## TCP options
tcp_nodelay on;
#tcp_nopush on;
## Compression
gzip on;
gzip_disable "MSIE [1-6]\.";
gzip_buffers 32 64k;
gzip_comp_level 7;
gzip_min_length 1024;
gzip_proxied any;
gzip_types text/plain application/x-javascript text/css text/javascript text/xml image/x-icon image/bmp;
gzip_vary on;
#FastCGI相关参数是为了改善网站的性能:减少资源占用,提高访问速度。
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffers 4 256k;
fastcgi_buffer_size 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
#####include coco #########
#include ./vhosts/80_jv.conf;
include ./vhosts/81_Bus.conf;
include ./vhosts/82_Api.conf;
include ./vhosts/83_Po.conf;
include ./vhosts/85_Sup.conf;
include ./vhosts/80_vip.conf;
include ./vhosts/80_med.conf;
include ./vhosts/80_www.conf;
include ./vhosts/86_product.conf;
include ./vhosts/87_Pur.conf;
include ./vhosts/90_Wap.conf;
include ./vhosts/80_gitlab-nginx.conf;
include ./vhosts/8082_med.conf;
include ./vhosts/8083_ed.conf;
include ./vhosts/8020_apache.conf;
include ./vhosts/80_JDict.conf;
include ./vhosts/8085_wms.conf;
include ./vhosts/5000_feedback.conf;
include ./vhosts/8088_xwms.conf;
}