nginx常用变量
2016-03-17 11:39
260 查看
$args, 请求中的参数;
$content_length, HTTP请求信息里的”Content-Length”;
$content_type, 请求信息里的”Content-Type”;
$document_root, 针对当前请求的根路径设置值;
$document_uri, 与$uri相同;
$http_user_agent 用户的浏览器
$http_cookie cookie
$host, 请求信息中的”Host”,如果请求中没有Host行,则等于设置的服务器名;
$limit_rate, 对连接速率的限制;
$request_method, 请求的方法,比如”GET”、”POST”等;
$remote_addr, 客户端地址;
$remote_port, 客户端端口号;
$remote_user, 客户端用户名,认证用;
$request_filename, 当前请求的文件路径名
$request_body_file, ??
$request_uri, 请求的URI,带参数;
$query_string, 与$args相同;
$scheme, 所用的协议,比如http或者是https,比如rewrite ^(.+)$ $scheme://example.com$1 redirect;
$server_protocol, 请求的协议版本,”HTTP/1.0″或”HTTP/1.1″;
$server_addr, 服务器地址,如果没有用listen指明服务器地址,使用这个变量将发起一次系统调用以取得地址(造成资源浪费);
$server_name, 请求到达的服务器名;
$server_port, 请求到达的服务器端口号;
$uri, 请求的URI,可能和最初的值有不同,比如经过重定向之类的。
$content_length, HTTP请求信息里的”Content-Length”;
$content_type, 请求信息里的”Content-Type”;
$document_root, 针对当前请求的根路径设置值;
$document_uri, 与$uri相同;
$http_user_agent 用户的浏览器
$http_cookie cookie
$host, 请求信息中的”Host”,如果请求中没有Host行,则等于设置的服务器名;
$limit_rate, 对连接速率的限制;
$request_method, 请求的方法,比如”GET”、”POST”等;
$remote_addr, 客户端地址;
$remote_port, 客户端端口号;
$remote_user, 客户端用户名,认证用;
$request_filename, 当前请求的文件路径名
$request_body_file, ??
$request_uri, 请求的URI,带参数;
$query_string, 与$args相同;
$scheme, 所用的协议,比如http或者是https,比如rewrite ^(.+)$ $scheme://example.com$1 redirect;
$server_protocol, 请求的协议版本,”HTTP/1.0″或”HTTP/1.1″;
$server_addr, 服务器地址,如果没有用listen指明服务器地址,使用这个变量将发起一次系统调用以取得地址(造成资源浪费);
$server_name, 请求到达的服务器名;
$server_port, 请求到达的服务器端口号;
$uri, 请求的URI,可能和最初的值有不同,比如经过重定向之类的。
相关文章推荐
- nginx具体的配置以及参数说明
- CentOS 6.5 安装 Nginx 1.7.8 教程
- nginx[未完待续]
- nginx fastcgi 超时问题解决记录
- 基于nginx和uWSGI在Ubuntu上部署Djan
- Ubuntu上简单搭建nginx
- 浅谈Nginx负载均衡原理与实现
- 如何在 FreeBSD 10.2 上安装使用 Nginx 的 Ghost
- 简单配置nginx使之支持pathinfo
- LNMP环境下Nginx、PHP、MySQL优化
- CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3
- Nginx PHP 使用 limit_req,limit_conn 限制并发,外加白名单
- Nginx 499错误的原因及解决方法
- apache和nginx的区别
- Nginx安装、配置及使用总结
- linux 安装nginx
- Linux---nginx+ffmpeg搭建流媒体服务器
- linux下php开发环境搭建(nginx+php+mysql)
- nginx添加用户认证
- nginx lvs