发表于: 2017-10-18 23:38:02
1 785
今天完成的事情:
安装nginx


发现阿里云安全组没开


配置nginx


配置nginx.conf


访问成功


日志不更新,重启nginx
怎么看nginx日志:
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
'$upstream_addr $upstream_response_time $request_time ';
access_log logs/access.log main;
#配置access log日志的存储位置及文件,注意:access.log文件是可以按日期进行分割的,方便查看及处理
access_log /usr/local/nginx/log/access.log main;
相关说明解释
1.$remote_addr 与$http_x_forwarded_for 用以记录客户端的ip地址;
2.$remote_user :用来记录客户端用户名称;
3.$time_local : 用来记录访问时间与时区;
4.$request : 用来记录请求的url与http协议;
5.$status : 用来记录请求状态;成功是200,
6.$body_bytes_s ent :记录发送给客户端文件主体内容大小;
7.$http_referer :用来记录从那个页面链接访问过来的;
8.$http_user_agent :记录客户端浏览器的相关信息;
分类: nginx



今天计划完成的事情:今天计划还是做任务
遇到的问题暂无
收获:脱坑,了解nginx
评论