中国开发网: 论坛: 超级垃圾站: 贴子 762960
cndev.org
另外一个人配置的
抽时间说一下nginx.conf的配置文件,也是给自己巩固一下。nginx大部分的配置都写在nginx.conf这个配置文件中。
现在我们就来看一下nginx.conf。
PLAIN TEXT
CODE:
# Nginx Configuration Core File
# Written by Nanu

daemon on; # 作为守护进程运行 Nginx
user www www;

worker_rlimit_nofile 4096; # 加大 Nginx 所能操作的文件句柄数
worker_processes 4; # 工作进程数

error_log logs/error.log error; # 错误日志的保存路径

pid var/nginx.pid; # 保存进程id号
lock_file var/nginx.lock;

events {
worker_connections 4096; # 每线程最多可接受的连接数,worker_processes * worker_connections
use epoll;
multi_accept on; #
}

http {
include mime.types;
default_type application/octet-stream;
server_names_hash_max_size 512;
server_names_hash_bucket_size 128;

sendfile off; # 文件传输处理方式,sendfile 性能低,关闭;
tcp_nopush off; # Linux 内核 tcp_nopush TCP 函数调用,关闭;
tcp_nodelay on; # Linux & FreeBSD 内核 TCP 函数调用,开启;

keepalive_timeout 3; # 每个链接保存的时长(单位:秒)
client_max_body_size 2m;
client_header_timeout 30;
client_body_timeout 30;
send_timeout 30;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;

client_header_buffer_size 1k;
large_client_header_buffers 4 4k;

gzip_static on;
gzip_min_length 1024; # 大于该字节数的内容才压缩
gzip_buffers 4 8k;
gzip_http_version 1.1;
gzip_comp_level 1;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

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 logs/access.log combined;

error_page 403 /data/www/wwwroot/maintenance/index.htm;
error_page 404 /data/www/wwwroot/maintenance/index.htm;
error_page 502 503 504 /data/www/wwwroot/maintenance/index.htm;

include vhosts/*;
}
提供SMT贴片服务!(GridSMT)

期待机器人面面的不辣的水煮鱼!!!

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录