V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
itopidea
V2EX  ›  NGINX

求助nginx返回503的问题设置

  •  
  •   itopidea ·
    itopidea · 2012-11-21 11:24:50 +08:00 · 3517 次点击
    这是一个创建于 4145 天前的主题,其中的信息可能已经有所发展或是发生改变。
    使用的nginx
    想让网站首页返回503代码
    其他页面都正常 200
    如何设置呢?急!
    1 条回复    1970-01-01 08:00:00 +08:00
    itopidea
        1
    itopidea  
    OP
       2012-11-21 11:35:02 +08:00
    已经解决

    location =/ {
    return 503;
    }

    这样就可以实现上面的问题。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3259 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 12:13 · PVG 20:13 · LAX 05:13 · JFK 08:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.