CentOS 6.3 编译安装Nginx 1.2.4
vi /usr/local/nginx/conf/nginx.confuser www www;
worker_processes 8;
worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;
pid /var/run/nginx.pid;
error_log /usr/local/nginx/logs/error.log crit;
worker_rlimit_nofile 65535;
events
{
use epoll;
worker_connections 65535;
}
http
{
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
keepalive_timeout 0;
client_header_buffer_size 16k;
client_max_body_size 32m;
large_client_header_buffers8 1024k;
client_header_timeout3m;
client_body_timeout 3m;
send_timeout 3m;
connection_pool_size 256;
request_pool_size 4k;
output_buffers 16 128k;
postpone_output1460;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 128k;
fastcgi_buffers 16 256k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;
fastcgi_temp_path /dev/shm;
open_file_cache max=65536 inactive=20s;
open_file_cache_min_uses 1;
open_file_cache_valid 30s;
tcp_nodelay on;
gzip on;
gzip_min_length1k;
gzip_buffers 16 1024k;
gzip_http_version 1.1;
gzip_types text/plain application/x-javascript text/css application/xml;
log_formataccess'$remote_addr - $remote_user [$time_local] "GET http://$host$request_uri $server_protocol" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
server
{
listen 80;
server_name _;
location ~ / {
deny all;
}
}
include vhosts/*.conf;
}
页:
[1]