码迷,mamicode.com
首页 >  
搜索关键字:remote_addr    ( 367个结果
nginx 常用全局变量
$args$content_length$content_type$document_root$document_uri$host$http_user_agent$http_cookie$limit_rate$request_body_file$request_method$remote_addr$remote_port$remote_user$request_filename$request_uri$query_string$scheme$server_protocol$server_addr$server..
分类:其他好文   时间:2015-08-18 16:38:37    阅读次数:177
nginx log format
log_format pre_search '$http_x_forwarded_for $remote_addr $remote_user [$time_local] $request_time_usec ' '"$request_method $request_uri" $hos...
分类:其他好文   时间:2015-08-17 21:39:08    阅读次数:100
nginx 限制
在nginx.conf里的http{}里添加:http{limit_conn_zone $binary_remote_addr zone=perip:10m;limit_conn_zone $server_name zone=perserver:10m;}$binary_remote_addr zo...
分类:其他好文   时间:2015-08-13 20:09:03    阅读次数:99
LNMP--Nginx不记录指定文件日志
编辑Nginx配置文件:[root@LampLinux~]#vim/usr/local/nginx/conf/nginx.conf找到下面一行:log_formatcombined_realip‘$remote_addr$http_x_forwarded_for[$time_local]‘‘$host"$request_uri"$status‘‘"$http_referer""$http_user_agent"‘;将内容更改为:log_formatlinan‘$rem..
分类:其他好文   时间:2015-08-12 15:03:19    阅读次数:156
2009年3月新浪PHP面试题及答案(一)
1. echo count(“abc”); 输出什么?答案:12. 用PHP代码写出显示客户端IP与服务器IP的代码。答案:客户端 getenv(‘REMOTE_ADDR’); 服务器端 getenv(‘SERVER_ADDR’);// gethostbyname(“www.phpmst.com”)...
分类:Web程序   时间:2015-08-12 13:07:45    阅读次数:201
c# 获取IP
客户端ip:Request.ServerVariables.Get("Remote_Addr").ToString();客户端主机名:Request.ServerVariables.Get("Remote_Host").ToString();客户端浏览器IE:Request.Browser.Brow...
分类:Windows程序   时间:2015-08-11 17:41:58    阅读次数:152
通过lua获取nginx的内置变量,通过这些变量做些逻辑的处理
Nginx提供了很多内置的变量,如:$arg_PARAMETER 这个变量包含在查询字符串时GET请求PARAMETER的值。$args 这个变量等于请求行中的参数。$binary_remote_addr 二进制码形式的客户端地址。$body_bytes_sent 传送页面的字节数$content_...
分类:其他好文   时间:2015-08-08 22:42:08    阅读次数:400
nginx记录真是的IP地址 <备忘>
nginx、haproxy等作为代理服务器时,要使后端web服务器记录真是的IP地址,需要配置:location/{ proxy_set_headerHost$host; proxy_set_headerX-Real-IP$remote_addr; proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for; proxy_bufferingoff; proxy_passhttp://bloke..
分类:其他好文   时间:2015-08-06 13:33:56    阅读次数:166
前端Nginx,后端Apache获取用户真实IP地址
Nginx作为前端,Apache作为后端的情况下,Apache只能获取到Nginx前端的内网ip地址(10.10.0.*),而无法获取到用户的真实ip地址,在这种情况下,后端是Apache如何获取用户真实IP地址?nginx关键配置proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set..
分类:Web程序   时间:2015-07-31 10:50:41    阅读次数:143
linux内核之accept实现
用户态对accept的标准用法: if ((client_fd = accept(sockfd, (struct sockaddr *)&remote_addr, &sin_size)) == -1) { //accept()函数让服务器接收客户的连接请求 perror("accept Error\...
分类:系统相关   时间:2015-07-30 12:56:35    阅读次数:450
367条   上一页 1 ... 27 28 29 30 31 ... 37 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!