V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
TangMonk
V2EX  ›  问与答

nginx 绑定域名,求帮助

  •  
  •   TangMonk · 2014-09-17 20:49:21 +08:00 · 2098 次点击
    这是一个创建于 3544 天前的主题,其中的信息可能已经有所发展或是发生改变。
    nginx绑定域名;

    在内网可以wget mydomain.com
    但是在外网却不行 wget mydomain.com

    我就是把默认的 site-avaliable/default 中的server_name 改了下。

    server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /usr/share/nginx/html;
    index index.html index.htm;

    # Make site accessible from http://localhost/
    server_name mydomain;

    location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
    # Uncomment to enable naxsi on this location
    # include /etc/nginx/naxsi.rules
    }

    # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
    #location /RequestDenied {
    # proxy_pass http://127.0.0.1:8080;

    用的西部数码的主机,不是到是不是他们的问题。(提个工单都要钱,无语)
    3 条回复    2014-09-18 08:35:47 +08:00
    wzxjohn
        1
    wzxjohn  
       2014-09-17 20:55:28 +08:00 via iPad
    域名解析没问题么?
    passluo
        2
    passluo  
       2014-09-17 20:57:09 +08:00   ❤️ 1
    应该是因为域名需要备案。你看看他帮助里面的备案政策。没有备案的主机好像不给开80端口。

    你可以用站长工具看看80端口开了没
    TangMonk
        3
    TangMonk  
    OP
       2014-09-18 08:35:47 +08:00
    @passluo 我扫描了下,主机的80端口确实没打开。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2513 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:50 · PVG 17:50 · LAX 02:50 · JFK 05:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.