【问题标题】:Nginx subdomains not workingNginx 子域不工作
【发布时间】:2017-01-21 15:05:58
【问题描述】:

我不知道怎么了。我在日志中没有收到任何警告。我有类似的配置 How to exclude specific subdomains server_name in nginx configuration

我想创建子域 us.example.io 我正在使用 ping 来检查它

ping us.example.io
ping: cannot resolve us.example.io: Unknown host

nginx.config

 server {
    server_name *. us.example.io us.example.io;
    listen 80;
    root /usr/share/nginx/html/bint;
    index index.html index.htm index.php;
    location / {
      try_files $uri $uri/ /index.html;   
    }
  }

  server {
    server_name us.example.io;
    listen 80;
    return http://www.google.com;
  }

【问题讨论】:

    标签: nginx


    【解决方案1】:

    问题与nginx无关。该错误表明您尚未为域配置 DNS 记录。

    【讨论】:

      猜你喜欢
      • 2012-01-06
      • 2017-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-14
      • 2017-06-30
      • 1970-01-01
      相关资源
      最近更新 更多