无法找到Route53路由问题DNS地址

时间:2016-03-26 22:15:43

标签: django nginx amazon-ec2 dns

您好我在Route53上注册了两个域,www.sample.comsample.com

现在www.sample.com一条记录指向一个绑定到EC2的弹性IP(使用Django + Gunicorn + Nginx)。 www.sample.com网站工作得非常好所以我尝试将sample.com的A记录重新路由到同一个ip,但我一直在解决问题DNS address could not be found.任何人都知道为什么?

我是否还必须将nginx配置文件更改为正在收听sample.com

这是配置文件

server {
    listen 80;

    server_name www.sample.com;
    return 301 https://$server_name$request_uri;
}
server {
    listen 443 ssl;
    server_name www.sample.com
    # add Strict-Transport-Security to prevent man in the middle attacks
    add_header Strict-Transport-Security "max-age=31536000";
    ssl_certificate /etc/nginx/ssl/sample_com/ssl-bundle.crt;
    ssl_certificate_key /etc/nginx/ssl/sample_com/sample_com.key;


    # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    root /home/ubuntu/sample_Landing_page/;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        alias /home/ubuntu/sample_Landing_page/static/static_root/;
        expires 365d;
    }

    location / {
        include proxy_params;
        proxy_pass    
      http://unix:/home/ubuntu/sample_Landing_page/sample_Landing.sock;
    }

}

0 个答案:

没有答案