Nginx配置文件详解
来源:互联网 发布:安卓陀螺仪软件 编辑:程序博客网 时间:2024/06/10 17:15
Nginx配置文件路径: usr/local/nginx/conf/nginx.conf
user www www; 指nginx用户及组
worker_processes 8; 工作进程:数目
worker_rlimit_nofile 65535; 指定进程可以打开的最大描述符:数目
events
{
use epoll; 使用epoll的I/O模型
worker_connections 65535; 每个工作进程的最大连接数量
}
http {
include mime.types;
default_type application/octet-stream;
#charset gb2312;
server_names_hash_bucket_size 128; 解决虚拟主机多域名的问题,32的倍数为宜
client_header_buffer_size 32k; 客户端请求头部的缓存区大小
large_client_header_buffers 4 32k; 客户请求头缓存大小
client_max_body_size 8m; 通过nginx上传文件的大小
sendfile on; 指定nginx是否调用sendfile函数来输出文件
tcp_nopush on; 允许或禁止使用socke的TCP_CORK的选项,此选项使用 sendfile的时候使用
keepalive_timeout 60; 与客户端连接的超时时间,超过会断开连接
tcp_nodelay on; 不缓存数据,而是一段一段的发送
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zone crawler $binary_remote_addr 10m;
log_format '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
include /usr/local/nginx/conf/vhosts/*.conf;
}
原文链接: http://blog.csdn.net/tjcyjd/article/details/50695922
http://blog.csdn.net/u012116457/article/details/53782187
http://www.chinaz.com/web/2015/0424/401323.shtml
http://blog.csdn.net/ILOVESMJ/article/details/51555795?locationNum=6&fps=1
- Nginx配置文件nginx.conf详解
- 【Nginx笔记】nginx配置文件详解
- Nginx 配置文件nginx.conf 详解
- NGINX配置文件nginx.conf详解
- nginx配置文件nginx.conf详解
- Nginx配置文件nginx.conf详解
- Nginx配置文件详解(nginx.conf)
- Nginx配置文件nginx.conf详解
- Nginx配置文件nginx.conf详解
- Nginx nginx.conf配置文件详解
- Nginx 配置文件 nginx.conf 详解
- Nginx配置文件nginx.conf详解
- Nginx 配置文件 nginx.conf 详解
- Nginx 配置文件 nginx.conf 详解
- Nginx配置文件nginx.conf详解
- Nginx配置文件nginx.conf详解
- Nginx 配置文件 nginx.conf 详解
- Nginx配置文件nginx.conf详解
- Android 蓝牙技术 带你实现终端间数据传输
- traceroute程序的实现
- sonarqube之Replace this usage of System.out or System.err by a logger.
- Linux 常见命令
- android 音视频相关知识
- Nginx配置文件详解
- Q.缺少NetBeans模块运行所必需的JDK
- 自定义GP工具
- 好长一个sql语句
- WRF學習筆記
- 进制转换
- 雪花匹配——hash表应用
- 关于IBM PowerSC 软件与Oracle RAC的恩怨
- Oracle 锁表解锁