码迷,mamicode.com
首页 >  
搜索关键字:http_user_agent    ( 158个结果
Nginx禁止蜘蛛爬取服务器
修改nginx.conf,禁止网络爬虫的ua,返回403 添加agent_deny.conf配置文件 #禁止Scrapy等工具的抓取 if ($http_user_agent ~* (Scrapy|Curl|HttpClient)) { return 403; } #禁止指定UA及UA为空的访问 i ...
分类:其他好文   时间:2020-02-12 18:38:56    阅读次数:84
nginx触屏版跟PC的代理设置
server { listen 80; set $mobile_rewrite do_not_perform; if ( $http_user_agent ~* "(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compa... ...
分类:其他好文   时间:2019-07-20 00:10:57    阅读次数:118
Logstash解析Nginx访问日志
Nginx日志格式log_formatmain‘$remote_addr-$remote_user[$time_local]"$request"‘‘$status$body_bytes_sent"$http_referer"‘‘"$http_user_agent""$http_x_forwarded_for"‘‘"$http_host""$request_time""$upstream_respo
分类:其他好文   时间:2019-07-12 00:52:57    阅读次数:351
自定义nginx访问日志和内置变量使用
自定义nginx访问日志和内置变量使用安装第三方echo模块后查看内置变量内置变量1.$args用户在浏览器中查找的相关参数(uri中?之后的字段)2.$document_root站点根目录所在的位置3.$document_uri去除url中域名部分后所剩下的目录4.$host所访问的主机5.$http_user_agent客户端所使用的浏览器6.$http_cookie客户端的cookie信息7
分类:其他好文   时间:2019-06-03 09:31:15    阅读次数:156
PHP判断客户端为PC还是手机
functionis_mobile(){$agent=strtolower($_SERVER[‘HTTP_USER_AGENT‘]);$is_pc=(strpos($agent,‘windowsnt‘))?true:false;$is_mac=(strpos($agent,‘macos‘))?true:false;$is_iphone=(strpos($agent,‘iphone‘))?true:
分类:移动开发   时间:2019-04-21 17:33:53    阅读次数:230
nginx内置变量 大全
内置变量存放在 ngx_http_core_module 模块中,变量的命名方式和apache 服务器变量是一致的。总而言之,这些变量代表着客户端请求头的内容,例如$http_user_agent, $http_cookie, 等等。下面是nginx支持的所有内置变量: $arg_name请求中的的 ...
分类:其他好文   时间:2018-12-14 17:38:35    阅读次数:195
filebeat 6.4.3 采集 nginx日志
filebeat6.4.3采集nginx日志nginx日志格式规范:将日志配置组合添加至nginx主配置文件;log_formateslog‘$remote_addr-$remote_user[$time_local]"$request"‘‘$status$body_bytes_sent"$http_referer"‘‘"$http_user_agent""$http_x_forwarded_fo
分类:其他好文   时间:2018-11-16 20:59:05    阅读次数:1078
当前是否为微信访问
1 function isWeixin() { 2 if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false) { 3 return true; 4 } 5 return false; 6 } ...
分类:微信   时间:2018-11-15 01:33:16    阅读次数:196
php判断是不是手机端访问
最笨方法自己亲测! if (isset($_SERVER['HTTP_USER_AGENT'])) { $clientkeywords = array('iphone', 'android', 'phone', 'mobile', 'wap', 'netfront', 'java', 'opera ...
分类:移动开发   时间:2018-09-27 18:07:25    阅读次数:155
goaccess 分析nginx日志例子
格式 log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_fo ...
分类:数据库   时间:2018-09-25 14:08:30    阅读次数:218
158条   上一页 1 2 3 4 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!