2

I don't know what's wrong. I don't get any warnings in logs. I've similar config to this How to exclude specific subdomains server_name in nginx configuration

I want to create subdomain us.example.io I'm using ping to check it

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;
  }
Community
  • 1
  • 1
Jakub Pomykała
  • 2,082
  • 3
  • 27
  • 58

1 Answers1

7

The problem has nothing to do with nginx. The error suggests that you haven't configured a DNS record for the domain.

VBart
  • 14,714
  • 4
  • 45
  • 49