• 服务器部署nginx报错 nginx: [warn] conflicting server name "localhost" on xxx.xxx.xxx.xxx:80, ignored


    问题

    修改nginx配置参数后,使用nginx -t检查配置.

    提示successfull后就可以使用 nginx -s reload来重新加载配置

    我配置的过程中遇到这样的问题,就是绑定了主机名后,重新加载配置时会出现警告

    nginx: [warn] conflicting server name "localhost" on xxx.xxx.xxx.xxx:80, ignored

    方法

    网上有说,是两三个搞了同一个ip和端口号或名字的,要我们改。

    而且这个也只是警告,不影响使用。

    所以大多数人就无视了。

    可需少数人如我,根本不知道这个东西不影响使用....

    于是只能查。

    问题还真是两三个搞了同一个ip和端口号或名字的,

    nginx有个默认的端口检测,如443,80等等,他也会报这个错,因为这端口可能被mysql或者redis或者tomcat,https之类的占了

    还有127.0.0.1,0.0.0.0,localhost之类的也不要用,迟早会报错。

    总结

    这个报错,就是你命名不规范的报错,nginx 1.14只是warn,迟早新版本会error啊。

  • 相关阅读:
    668. Kth Smallest Number in Multiplication Table
    658. Find K Closest Elements
    483. Smallest Good Base
    475. Heaters
    454. 4Sum II
    441. Arranging Coins
    436. Find Right Interval
    410. Split Array Largest Sum
    392. Is Subsequence
    378. Kth Smallest Element in a Sorted Matrix
  • 原文地址:https://www.cnblogs.com/ydymz/p/9542912.html
Copyright © 2020-2023  润新知