nginx配置中常用的内置全局变量

变量名 功能
$host 请求信息中的Host,如果请求中没有Host行,则等于设置的服务器名
$request_method 客户端请求类型,如get、post
$remote_addr 客户端的IP地址
$args 请求中的参数
$content_length 请求头中Content-length字段
$http_user_agent 客户端agent信息
$http_cookie 客户端cookie信息
$remote_port 客户端的端口
$server_protocol 请求使用的协议,如HTTP/1.0、HTTP/1.1
$server_addr 服务器地址
$server_name 服务器名称
$server_port 服务器的端口号

猜你喜欢

转载自blog.csdn.net/baidu_39009276/article/details/125653916