search

Home  >  Q&A  >  body text

nginx server_name configuration problem

Configuration file

server {
        listen       8899;
        server_name  tc.com;

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

It is useless to access tc.com:8899 through the browser, but it is useful to use localhost:8899. Why is this?

为情所困为情所困2754 days ago505

reply all(2)I'll reply

  • 给我你的怀抱

    给我你的怀抱2017-05-16 17:11:05

    I suspect you don’t know the difference between DNS and domain name and server_name

    reply
    0
  • 迷茫

    迷茫2017-05-16 17:11:05

    Forgot to change hosts

    reply
    0
  • Cancelreply