nginx单独添加模块|日志记录post数据
来源:互联网 发布:mac给iphone装软件 编辑:程序博客网 时间:2024/06/06 07:14
问题1:原已经安装好的nginx,现在需要添加一个未被编译安装的模块:
nginx -V 可以查看原来编译时都带了哪些参数
原来的参数:
--prefix=/app/nginx
添加的参数:
--with-http_stub_status_module --with-http_ssl_module --with-http_realip_module
步骤如下:
1. 使用参数重新配置:
./configure --prefix=/app/nginx -user=nobody -group=nobody --with-http_stub_status_module \
--with-http_ssl_module --with-http_realip_module \
--add-module=../nginx_upstream_hash-0.3.1/ \
--add-module=../gnosek-nginx-upstream-fair-2131c73/
2. 编译:
make
#不要make install,否则就是覆盖安装
3. 替换nginx二进制文件:
cp /app/nginx/sbin/nginx /app/nginx/sbin/nginx.bak
cp ./objs/nginx /app/nginx/sbin/
问题2:想在日志中记录post过来的数据?
$request_body这个变量值就是POST数据
log_format post_tracking '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" $http_x_forwarded_for $request_body';
$request_body这个变量值就是POST数据
- nginx单独添加模块|日志记录post数据
- nginx日志中记录post数据
- nginx接受post数据,并在日志里记录数据
- nginx把post的数据记录到日志中
- Nginx记录post请求数据
- 让nginx日志支持记录POST请求
- Nginx正确记录post日志的方法
- nginx日志记录post的参数
- nginx记录响应与POST请求日志
- nginx 接口单独划分日志
- nginx日志记录请求和响应数据
- nginx单独模块编译的makefile编写
- nginx日志模块分析
- 2.4内核编译添加单独的模块!
- 事务方法里如何单独添加日志
- nginx日志记录切割
- nginx 添加C++模块
- (转)nginx添加模块
- 模板swap
- 好禽兽呀
- 在java 中使用 hibernate
- 成绩函数版
- JAVA中的数组与集合,以及互转
- nginx单独添加模块|日志记录post数据
- MySQL备份与恢复之percona-xtrabackup实现增量备份及恢复
- 运行adaddnode.pl报错ORA-01403 And ORA-06512
- Service和Thread的区别
- Android_WindowManager_实现类似360流量悬浮框
- effective c++
- LLVM Overview
- LeetCode Longest Palindromic Substring
- VisualStudio快捷键总结