首页 > 作文

调试location指令时,直接让location输出文本

更新时间:2023-04-07 16:28:41 阅读: 评论:0

有时候我们调试location指令时希望location指令能够直接输出文本,这样能够方便我们进行调试。这时我们可以使用echo模块实现,但是大多数情况我们没有安装这个模块,那么我们还可以使用另一个方法来实现这个想法

直接返回文本

location / {  default-type text/plain;  return 502 "this is a test message";        }

华农大html标签格式

location / {  default-type text/html;  return 502 "this is a test message";        }

返回json文本

locati蚌埠的大学on / {            default_圣诞英语type application/json;      visit      return 502 '{"name":"mayuan","age"感恩的话语:18}';        }

本文发布于:2023-04-07 16:28:40,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/7af4adbb27bdd7f2ea8763c0e5537cf9.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:调试location指令时,直接让location输出文本.doc

本文 PDF 下载地址:调试location指令时,直接让location输出文本.pdf

下一篇:返回列表
标签:文本   指令   模块   蚌埠
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图