码迷,mamicode.com
首页 >  
搜索关键字:remote_addr    ( 367个结果
wordpress博客站点配置及数据库迁移
1.wordpress博客站点部署配置1.1检查环境1.1.1nginx.conf配置文件###检查nginx配置文件[root@web02conf]#catnginx.confworker_processes1;events{worker_connections1024;}http{log_formatmain‘$remote_addr-$remote_user[$time_local]"$request"‘‘$status$body_bytes_sent"$ht..
分类:数据库   时间:2017-07-11 23:30:15    阅读次数:827
nginx不记录指定文件类型的日志
1、指定记录文件日志记录的内容。 vim /usr/local/nginx/conf/nginx.conf如下部分: log_format dd '$remote_addr $http_x_forwarded_for [$time_local]' '$host "$request_uri" $sta ...
分类:其他好文   时间:2017-07-04 22:25:46    阅读次数:261
nginx不记录指定文件类型日志
1、指定记录文件日志记录的内容。 vim /usr/local/nginx/conf/nginx.conf如下部分: log_format dd '$remote_addr $http_x_forwarded_for [$time_local]' '$host "$request_uri" $sta ...
分类:其他好文   时间:2017-07-04 15:32:01    阅读次数:222
C#获取客户端IP地址
客户端ip:Request.ServerVariables.Get("Remote_Addr").ToString();客户端主机名:Request.ServerVariables.Get("Remote_Host").ToString();客户端浏览器IE:Request.Browser.Brow ...
分类:Windows程序   时间:2017-06-30 12:37:09    阅读次数:213
ELK收集nginx日志并用高德地图展示出IP
(一)测试的环境agentd:192.168.180.22ES:192.168.180.23kibana:192.168.180.23采用的拓扑:logstash-->ES-->kibana(二)实施步骤:(1)logstsh具体配置:1,配置nginx日志格式,采用log_format格式:log_formatmain‘$remote_addr-$remote_user[$time_local]"$request..
分类:其他好文   时间:2017-06-21 20:02:00    阅读次数:319
【PHP】获取用户真实IP
function get_real_ip() { $ip = $_SERVER['REMOTE_ADDR']; if (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', ... ...
分类:Web程序   时间:2017-06-20 12:24:50    阅读次数:219
Nginx 不记录指定文件类型的日志
Nginx不记录指定文件类型的日志查看主配置文件:[root@LHQvhosts]#vim../nginx.conf在配置文件里:log_formatcombined_realip‘$remote_addr$http_x_forwarded_for[$time_local]‘(日志格式)(日志名字)(两个IP,一个自己的IP,一个代理IP)(时间)‘$host"$request_uri"$sta..
分类:其他好文   时间:2017-06-15 00:37:31    阅读次数:173
常用Request对象获取请求信息
Request.ServerVariables(“REMOTE_ADDR”) ‘获取访问IPRequest.ServerVariables(“LOCAL_ADDR”) ‘同上Request.ServerVariables(“SERVER_NAME”) ‘获取服务器IPRequest.ServerVa ...
分类:其他好文   时间:2017-06-14 12:53:02    阅读次数:196
Django Nginx反代 获取真实ip
非反代情况下Django 中 ip = request.META['REMOTE_ADDR'] 即可拿到对应ip地址 Nginx、fcgi、uwsgi等反代情况下 vi /etc/nginx/conf.d/xxx.conf 加入下面几行 location / { proxy_pass http:// ...
分类:其他好文   时间:2017-06-12 18:52:31    阅读次数:1559
Nginx反向代理apache及Nginx
一.代理apahce:1.先配置nginx配置文件:[root@centos7conf.d]#vim/opt/app/nginx/conf.d/wordpress.confserver{listen80;server_namelocalhost;location/{proxy_passhttp://192.168.1.204;proxy_set_headerX-Real-IP$remote_addr;}}2.若apache需要看到客户端真是IP,需要修改配置..
分类:Web程序   时间:2017-06-09 10:04:27    阅读次数:147
367条   上一页 1 ... 14 15 16 17 18 ... 37 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!