首页 > 其他 > 详细

nginx return 调试变量

时间:2021-06-16 00:11:06      阅读:20      评论:0      收藏:0      [点我收藏+]
location / {
        set $upstream_name "10.x.x.x:8711";
        more_set_headers ‘Content-Type: text/html; charset=utf-8‘;
        return 200 "系统已经迁移至 xz.test.com,相关问题请咨询xxx";
        proxy_pass  http://$upstream_name;
    }

  

location ^~ /pic {
          default_type text/html ;
          return 200  ‘test test test ‘;
        }

  

 location ^~ /pic {
          default_type application/json ;
          return 200  ‘{"name":"nanjing_wuxu","result":"success"}‘;
        }

  

 location ^~ /pic {
          return http://192.168.1.19:8080/aa.jpg;
        }

  

ocation = /test {
         return 403 ;
        }

  

nginx return 调试变量

原文:https://www.cnblogs.com/cxd4321/p/14886462.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!