Home
Sign Up
Sign In
V2EX
›
问与答
Nginx 是不是有个直接配置显示文本的指令?
nikoo
·
Dec 29, 2016
· 1801 views
This topic created in 3596 days ago, the information mentioned may be changed or developed.
我记得是:
location /test {
show-text "Just a test!";
}
然后访问 /test 显示文本 Just a test!
有没有这个 show-text 指令?这个指令名字是啥来着?
谢谢!
test
show-text
指令
Just
3 replies
•
2016-12-29 10:45:55 +08:00
Niphor
Dec 29, 2016
1
echo ?
yangg
Dec 29, 2016
2
echo 好像是 openresty 的,可以直接 return "Just a test!"
nlzy
Dec 29, 2016 via iPhone
1
3
location = /test {
default_type text/plain;
return 200 "Just a test!";
}
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
2918 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 28ms ·
UTC 12:33
·
PVG 20:33
·
LAX 04:33
·
JFK 07:33
♥ Do have faith in what you're doing.
❯