## global variables # set $domain api.hiproxy.org; # set $local 127.0.0.1:8800; ## simple rewrite rule # http://api.hiproxy.org => http://hiproxy.org/api/; ## standard rewrite url # domain hiproxy.org { # set_header Access-Control-Allow-Origin *; ## Normal location # location /api/order/detail { # proxy_pass http://$local/user/?domain=$domain; # set_header Set-Cookie userID 200908204140; #} ## RegExp location # location ~ /(usercenter|userinfo)/ { # proxy_pass http://127.0.0.1:3008/info/; # } ## Static files # location /static_file/ { # alias ./src/view/; # root app.html; # } ## echo directive # location /echo { # echo
test echo directive
; # echofinish
; # } ## send static file # location /file { # send_file ./public/$query_string; # } # }