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

nginx 如何设置允许通过 IP 访问网站?

  •  1
     
  •   wvwking · 2015-02-05 22:36:33 +08:00 · 4267 次点击
    这是一个创建于 3339 天前的主题,其中的信息可能已经有所发展或是发生改变。

    没有域名,所以打算直接通过IP访问。

    qq446015875
        1
    qq446015875  
       2015-02-05 22:41:08 +08:00
    我对nginx不熟,但是,这……需要设置么?
    wdlth
        2
    wdlth  
       2015-02-05 22:59:58 +08:00
    http://nginx.org/en/docs/http/server_names.html#miscellaneous_names
    里面写着
    listen 80 default_server;
    server_name _;
    wvwking
        3
    wvwking  
    OP
       2015-02-05 23:18:08 +08:00
    @qq446015875 之前没有设置的时候,没办法通过IP来访问,不知道是因为什么。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1136 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 18:34 · PVG 02:34 · LAX 11:34 · JFK 14:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.