keepalive日志_12.日志收集项目-数据流图以及nginx安装
数据流图
nginx安装
中文文档
http://tengine.taobao.org/nginx_docs/cn/docs/
基础依赖与安装
yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
yum -y install wget vim httpd-tools
yum源在官网拷贝
vi /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
yum -y install nginx
启动
service nginx start
默认位置
默认配置位置:/etc/nginx/nginx.conf和 /etc/nginx/conf.d
默认日志位置:/var/log/nginx/access.log
Nginx基本配置语法
vi /etc/nginx/nginx.conf
vi /etc/nginx/conf.d/default.conf
修改配置以后,需要重启服务
检查配置
nginx -t -c /etc/nginx/nginx.conf
重新加载
nginx -s reload
也可以直接restart重启服务
service nginx restart
nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
# load modules compiled as Dynamic Shared Object (DSO)
#
#dso {
# load ngx_http_fastcgi_module.so;
# load ngx_http_rewrite_module.so;
#}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
log_format my_format '$remote_addr^A$msec^A$http_host^A$request_uri';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
location = /log.gif {
default_type image/gif;
access_log /var/log/nginx/access.log my_format;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ .php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ .php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
注意:log.gif放在/usr/share/nginx/html中
keepalive日志_12.日志收集项目-数据流图以及nginx安装相关推荐
- golang练手项目日志收集项目(二)
项目介绍:日志收集项目 主要功能:收集日志并且可视化查询日志 开发环境 :windos+idea 项目描述:收集日志并且在可视化页面中查询日志信息 主要技术:etcd+kafka+ElasticSea ...
- 几十条业务线日志系统如何收集处理?
在互联网迅猛发展的今天 各大厂发挥十八般武艺的收集用户的各种信息,甚至包括点击的位置,我们也经常发现自己刚搜完一个东西,再打开网页时每个小广告都会出现与之相关联的商品或信息,在感叹智能的同时不惊想 什 ...
- docker-compose观察实时日志_大数据项目实战之在线教育(03实时需求) - 十一vs十一...
第1章Spark Streaming概念 Spark Streaming 是核心Spark API的扩展,可实现实时数据的可扩展,高吞吐量,容错处理.数据可以从许多来源(如Kafka,Flume,Ki ...
- 从零搭建一个基于 ELK 的日志、指标收集与监控系统
在需要私有化部署的系统中,大部分系统仅提供系统本身的业务功能,例如用户管理.财务管理.客户管理等.但是系统本身仍然需要进行日志的采集.应用指标的收集,例如请求速率.主机磁盘.内存使用量的收集等.同时方 ...
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
Logstash是一个完全开源的工具,他可以对你的日志进行收集.分析,并将其存储供以后使用(如,搜索),您可以使用它.说到搜索,logstash带有一个web界面,搜索和展示所有日志. kibana ...
- ELK学习2_用Kibana和logstash快速搭建实时日志查询、收集与分析系统
Logstash是一个完全开源的工具,他可以对你的日志进行收集.分析,并将其存储供以后使用(如,搜索),您可以使用它.说到搜索,logstash带有一个web界面,搜索和展示所有日志. kibana ...
- 1.8-1.10 大数据仓库的数据收集架构及监控日志目录日志数据,实时抽取之hdfs系统上...
一.数据仓库架构 二.flume收集数据存储到hdfs 文档:http://flume.apache.org/releases/content/1.9.0/FlumeUserGuide.html#hd ...
- python服务端开发调试日志系统_Python Django项目日志查询系统
该项目适合中小型公司日志查询工作.大型公司可以使用elk等.该系统其实就是调用了absible命令去查日志,然后把输出的信息输到页面查看. 日志查询系统 维护手册 作者:陈土锋 日期:2020年6月1 ...
- 日志10.24整合项目文档并运行+周报10.18~22工作总结
日志10.24整合项目文档并运行 一. 安装pnpm,更新代码与远程同步,启动后端itms-server.前端itms-webapp项目 1.安装pnpm:已管理员身份运行命令行,跳转到前端文件夹it ...
最新文章
- seafile安装教程mysql密码_Seafile安装踩坑
- 分段线性拟合经典案例:计算多年气温最低值和最高值的分段线性变化趋势(附分段线性拟合工具下载)
- linux+4.4+android,Ubuntu 14.04 x64配置Android 4.4 kitkat编译环境的方法
- 谁才是Transformer家族中的最强王者?谷歌告诉你答案
- lEO数值资产系统某平台c2c币数值合约交易平台自动撮合松机器人功能
- 不学网php,php不学框架可以吗
- Lua学习笔记3. 函数可变参数和运算符、转义字符串、数组
- ubuntu16.04 打开chrome弹出“Enter password to unlock your login keyring”解决方法
- 【ArcGIS操作】4 空间分析篇
- 关于WPF绘图中的path.data在后台重新赋值的语法
- matlab2c使用c++实现matlab函数系列教程-pascal函数
- 特效字幕(ass)简易制作教程
- Tomcat热部署问题
- 树莓派运行python命令_《树莓派Python编程入门与实战》——2.2 使用Raspbian命令行...
- 三方协议、报到证(派遣证)、干部身份
- 【树莓派】树莓派安装中文输入法
- 洛谷----P2689 东南西北
- SequoiaDB巨杉数据库-配置
- web安全-文件上传(Js,MIME,文件头,黑白名单等校验)
- Windows IIS IUSR IWAM 帐户密码同步
热门文章
- linux3.0.4编译LDD中的scull全过程
- C#如何使用httpwebrequest通过代理访问网页
- android dialog 点击确定不消失,AlertDialog点击按钮不消失的实现方法
- html input file name,HTML Input FileUpload name用法及代码示例
- vue报错 TypeError: merge is not a function
- MybatisCodeHelperNew-2.8.1-191-201插件使用
- Android ContentProvider实现两个程序间数据共享demo,跨进程通讯
- Android GridView,recycleview,栅格布局
- ie11不兼容 html编辑器,ie11兼容性视图护驾浏览网页
- python爬取网页表格数据匹配,python爬虫——数据爬取和具体解析