码迷,mamicode.com
首页 > 其他好文 > 详细

nginx 内置变量

时间:2019-07-09 20:52:29      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:protoc   host   name   http   lis   oca   sch   header   pre   

内置变量

server {
        listen       80;
        server_name  cpu.enjoy.com;

if ( $http_origin ~ http://(.*).enjoy.com){
                 set $allow_url $http_origin;
        }

    #1    
location /var {
    echo $allow_url;
    echo ‘[host]=$host‘ ;
    echo ‘[http_HEADER]=$http_HEADER‘ ;
    echo ‘[remote_addr]=$remote_addr‘ ;
    echo ‘[remote_port]=$remote_port‘ ;
        echo ‘[request_method]=$request_method‘ ;
        echo ‘[request_uri]=$request_uri‘ ;
    echo ‘[scheme]=$scheme‘ ;
        echo ‘[server_name]=$server_name‘ ;
        echo ‘[server_protocol]=$server_protocol‘ ;
    echo ‘[uri]=$uri‘ ;
    echo ‘[http_origin]=$http_origin‘;
    echo ‘[http_user_agent]=$http_user_agent‘;
    echo ‘[request_filenameecho]=$request_filename‘;
}
}

 

nginx 内置变量

标签:protoc   host   name   http   lis   oca   sch   header   pre   

原文地址:https://www.cnblogs.com/newlangwen/p/11160277.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!