Posts with the tag 'Nginx'

Nginx配置

Ⅰ、Nginx配置文件的修改
修改nginx的默认配置文件:

CODE:
vi /etc/nginx/nginx.conf

按下面的内容修改Nginx的配置文件。兰色表示需要手动修改的内容,红色表示增加的内容:

#user  nobody;
# 指定子进程数,酌情修改
worker_processes  4;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid        logs/nginx.pid;
# 最多可打开文件数
worker_rlimit_nofile 8196;
events {
# 最大并发数
worker_connections  1024;
}
http {
include       mime.types;
default_type  application/octet-stream;
# 关掉错误日志
error_log       /dev/null  crit;
# 如果需要错误日志,就用下面这行替换上面这行
#error_log     /var/log/nginx/error.log  notice;
# 定义日志格式,对日志使用缓存,避免频繁的磁盘I/O操作
access_log   /var/log/nginx/access.log combined buffer=1m;
sendfile        on;
tcp_nopush      on;
tcp_nodelay     on;
keepalive_timeout  10;
# 对静态文件和可压缩文件启用压缩,以节约网络带宽,提高访问速度
gzip              on;
gzip_min_length   1k;
gzip_buffers      4 8k;
gzip_http_version 1.1;
gzip_comp_level   3;
gzip_types        text/html text/css text/xml [...]

Add comment 一月 1st, 2010

1 of 11

 

2010年三月
« 二    
1234567
891011121314
15161718192021
22232425262728
293031  

分类目录

标签

书签 优化 参数 命令 啪嗒砰 域名 备份 字体 安装 导入 导出 扩展 换行 文字 正则 爬虫 解决办法 路径 道具 错误 镜像 19楼 Apache awk AWstats CentOS CPAN EditPlus Firefox GD GeoIP Google IBM Linux mysql OUTLOOK Patapon perl photoshop PHP profile rsync sed Shell Thunderbird

最近文章

最近评论

文章索引模板

功能

SEO Powered by Platinum SEO from Techblissonline