[emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/nginx.conf:89
时间: 2024-01-08 19:20:53 浏览: 245
这是一个错误提示,它表示在 `/etc/nginx/nginx.conf` 文件的第 89 行和其他某个地方都存在一个重复的默认服务器指令,用于监听 `0.0.0.0:80` 的请求。这通常是由于在配置文件中定义了多个监听同一个端口的默认服务器而引起的。你可以检查该文件中的所有默认服务器配置,并删除其中一个重复的默认服务器配置。你也可以尝试使用 nginx 的配置文件检查工具来找出问题所在。
相关问题
一直 报nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/conf.d/utpre.caixuetang.cn.conf:8 nginx: configuration file /etc/nginx/nginx.conf test failed
这个错误提示是因为你在 `/etc/nginx/conf.d/utpre.caixuetang.cn.conf` 文件中定义了重复的默认服务器。请检查该文件中的配置并确保没有重复定义服务器。你也可以检查 `/etc/nginx/nginx.conf` 文件中是否有其他默认服务器的定义。如果有,请将其删除或注释掉。完成后,请重新测试nginx的配置文件。
nginx: [emerg] a duplicate listen 0.0.0.0:80 in /usr/local/nginx/conf/nginx.conf:42
This error message indicates that there is a duplicate "listen" directive in the nginx configuration file at line 42. The "listen" directive is used to specify the IP address and port number on which nginx should listen for incoming connections.
To resolve this error, you should remove the duplicate "listen" directive from the nginx configuration file. You can do this by editing the file using a text editor such as vim or nano, and then saving the changes. Once you have saved the changes, you can restart nginx to apply the new configuration by running the following command:
sudo service nginx restart
阅读全文