【问题标题】:Nginx issues after DNS changeDNS更改后的Nginx问题
【发布时间】:2012-10-10 18:28:42
【问题描述】:

基本上,我试图将我的域指向不同的 IP。

在检查 website/domain 时,似乎 DNS 已传播到新的 IP 地址。访问该站点时,我看到“欢迎使用 nginx!”信息。如果我直接加载 IP - 209.105.244.90,它会显示网站。我已经等了超过 24 小时才进行更改 - 但没有运气。

我错过了什么? 任何帮助,将不胜感激。

以下是 nginx 配置文件:

server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        root   html;
        index  index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
}

server {
  listen 80;
  server_name 209.105.244.90;
  root /home/firemonk/myapps/web/public;   # <--- be sure to point to 'public'!
  passenger_enabled on;

}

【问题讨论】:

  • 您当前的 ngingx 配置是什么?将其发布到问题可能会有所帮助。注意任何包含;你可能有一些相互竞争的server{} 声明。
  • @LarsRohrbach :刚刚更新了同样的问题。谢谢。

标签: dns nginx ip


【解决方案1】:

你的第一个服务器块有

server_name localhost;

你的第二个服务器块有

server_name 209.105.244.90;

换句话说,您的任何服务器块都没有设置为监听您的域名 -> 将您的域名添加到相关的服务器块

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-10-02
    • 2022-01-26
    • 1970-01-01
    • 2018-07-01
    • 1970-01-01
    • 2015-09-17
    • 1970-01-01
    • 2014-05-17
    相关资源
    最近更新 更多