Nginx子域无法正常工作

时间:2016-09-13 22:12:23

标签: nginx

我不知道出了什么问题。我在日志中没有收到任何警告。我有类似的配置 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;
  }

1 个答案:

答案 0 :(得分:4)

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