TangMonk
V2EX  ›  问与答

nginx 绑定域名,求帮助

  •  
  •   TangMonk · Sep 17, 2014 · 2529 views
    This topic created in 4321 days ago, the information mentioned may be changed or developed.
    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 replies    2014-09-18 08:35:47 +08:00
    wzxjohn
        1
    wzxjohn  
       Sep 17, 2014 via iPad
    域名解析没问题么?
    passluo
        2
    passluo  
       Sep 17, 2014   ❤️ 1
    应该是因为域名需要备案。你看看他帮助里面的备案政策。没有备案的主机好像不给开80端口。

    你可以用站长工具看看80端口开了没
    TangMonk
        3
    TangMonk  
    OP
       Sep 18, 2014
    @passluo 我扫描了下,主机的80端口确实没打开。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   942 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 20:13 · PVG 04:13 · LAX 13:13 · JFK 16:13
    ♥ Do have faith in what you're doing.