nginx返回特定字符串
1、返回文本
location ~ ^/get_text { default_type text/html; return 200 'This is text!'; }
2、返回json
location ~ ^/get_json { default_type application/json; return 200 '{"status":"success","result":"nginx json"}'; }

1、返回文本
location ~ ^/get_text { default_type text/html; return 200 'This is text!'; }
2、返回json
location ~ ^/get_json { default_type application/json; return 200 '{"status":"success","result":"nginx json"}'; }
