Home  >  Q&A  >  body text

linux - 阿里云域名(买了dns解析)和nginx绑定失败?[新人]

下面阿里云域名解析页面的截图,运行环境是ubuntu16.04。

p.s: 大神见谅,新人对这些概念都比较模糊,按着教程一步步走的,不太明白自己在干什么,所以为了安全起见修改了一下ip地址。但是通过$ dig 域名 +short是可以正确显示到我的域名和ip成功绑定的。

这是我的/etc/nginx/site-enabled/mysite.conf的配置。通过localhost:8080可以正确访问,但是通过excitedyue*.com:8080[我的域名,安全起见省掉了3个字母,请见谅]却不能访问。

server {
    listen 8080;
    server_name www.excitedyue*.com;

    location /static {
        alias /home/alps/mysite/blog/static;
    }

    location / {
        uwsgi_pass 127.0.0.1:8001;
        include     /etc/nginx/uwsgi_params;
    }
}

这是/etc/resolv.conf的内容

$ cat /etc/resolv.conf
nameserver 223.5.5.5
nameserver 223.6.6.6
高洛峰高洛峰2743 days ago909

reply all(5)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 15:55:48

    Your host cannot ping, make sure your domain name and IP are bound correctly.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 15:55:48

    Check firewall settings.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 15:55:48

    Brother, how much does it cost to buy this Alibaba Cloud for a year?

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 15:55:48

    Any questions?

    If the domain name is not registered, please register it as soon as possible. If it has been filed, post an error message or screenshot.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 15:55:48

    What are you doing? I remember the listen value when I was binding: 80. I followed the tutorial given by Ali to make a personal blog, but it didn’t mention binding the domain name. In the end, it took me a while to do it, just two steps:
    1. To resolve the domain name to the server, you need to set up the resolution.
    2. To bind the domain name to the server, you need to modify the nginx configuration file.
    I think you are at this step. Is it the problem here?

    reply
    0
  • Cancelreply