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 ;
        }

  

相关文章:

  • 2022-01-15
  • 2022-02-22
  • 2022-12-23
  • 2021-09-11
  • 2021-07-15
  • 2021-08-14
  • 2021-08-28
  • 2022-12-23
猜你喜欢
  • 2021-12-13
  • 2022-02-08
  • 2021-10-26
  • 2021-06-22
  • 2021-07-17
相关资源
相似解决方案