search

Home  >  Q&A  >  body text

IP access domain name NGINX resolution

After nginx has set up multiple domain name virtual hosts, if you access it directly through IP, which domain name virtual host will be accessed first? What are the rules?

高洛峰高洛峰2750 days ago441

reply all(2)I'll reply

  • 迷茫

    迷茫2017-05-16 17:13:25

    The first server
    See which server is placed first in your nginx.conf (if you have not defined a default server)

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 17:13:25

    1. What I’m talking about upstairs is a situation

    2. If configured in the following way, the first domain name virtual host will be read according to the system default file sorting by default

    include /path/nginx/vhost/*.conf

    reply
    0
  • Cancelreply