nginx server_name配置问题

配置文件

server {
        listen       8899;
        server_name  tc.com;

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

浏览器访问tc.com:8899没用,但是使用localhost:8899有用,这是为什么?

阅读 3.9k
2 个回答

忘改hosts了

我怀疑你不知道 DNS 和 域名 还有 server_name 是什么区别

推荐问题