V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
nikoo
V2EX  ›  问与答

Nginx 是不是有个直接配置显示文本的指令?

  •  
  •   nikoo · Dec 29, 2016 · 1492 views
    This topic created in 3406 days ago, the information mentioned may be changed or developed.
    我记得是:
    location /test {
    show-text "Just a test!";
    }

    然后访问 /test 显示文本 Just a test!
    有没有这个 show-text 指令?这个指令名字是啥来着?
    谢谢!
    3 replies    2016-12-29 10:45:55 +08:00
    Niphor
        1
    Niphor  
       Dec 29, 2016
    echo ?
    yangg
        2
    yangg  
       Dec 29, 2016
    echo 好像是 openresty 的,可以直接 return "Just a test!"
    nlzy
        3
    nlzy  
       Dec 29, 2016 via iPhone   ❤️ 1
    location = /test {
    default_type text/plain;
    return 200 "Just a test!";
    }
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3152 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 14:33 · PVG 22:33 · LAX 07:33 · JFK 10:33
    ♥ Do have faith in what you're doing.