nginx: [emerg] duplicate location “/“ in /usr/local/etc/nginx/nginx.conf:142
启动 Nginx 的时候报这个错,是因为在同一个 server 中重复定义了 location / 匹配协议,需要删除一个。后面的 :142 就是行号,找到这一行去检查,然后注释或者合并为一个即可。
nginx配置出错duplicate location “/”nginx: [emerg] duplicate location “/”
将nginx配置文件中的两个location合并成一个 就好了。 server { listen ******; listen *****; server_name ****; root /*****; location / { index index.php index.html ind...
本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。
产品推荐
{"cardStyle":"productCardStyle","productCode":"aliyun","productCardInfo":{"productTitle":"部署Nginx并通过Ingress暴露和监控服务","productDescription":"在阿里云容器服务(后简称ACK)集群中通过YAML文件快速部署一个Nginx应用并通过Nginx Ingress暴露和监控服务,结合使用ACK、日志服务、专有网络搭建业务部署运维方案。","productContentLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress","isDisplayProductIcon":true,"productButton1":{"productButtonText":"方案详情","productButtonLink":"https://www.aliyun.com/solution/tech-solution/nginx_ingress"},"productButton2":{"productButtonText":"一键部署","productButtonLink":"https://help.aliyun.com/document_detail/2400022.html"},"productButton3":{"productButtonText":"查看更多技术解决方案","productButtonLink":"https://www.aliyun.com/solution/tech-solution/"},"productPromotionInfoBlock":[{"$id":"0","productPromotionGroupingTitle":"解决方案推荐","productPromotionInfoFirstText":"MSE实现全链路灰度","productPromotionInfoFirstLink":"https://www.aliyun.com/solution/tech-solution/iflgbomse","productPromotionInfoSecondText":"云上经典架构","productPromotionInfoSecondLink":"https://www.aliyun.com/solution/tech-solution/habwoc"}]},"activityCardInfo":{"activityTitle":"","activityDescription":"","cardContentBackgroundMode":"LightMode","activityContentBackgroundImageLink":"","activityCardBottomInfoSelect":"activityPromotionInfoBlock"}}
相关电子书
更多
相关实验场景
更多
Nginx location相关内容
- Nginx location语法规则
- Nginx location语法
- Nginx location规则
- Nginx location匹配规则
- Nginx emerg location
- Nginx nginxconf配置文件location
- Nginx location匹配
- Nginx location配置
- Nginx location proxy_pass
- Nginx location指令
- Nginx location匹配规则解说
- Nginx location路径配置报错
- Nginx location规则优先级
- Nginx location alias
- Nginx location if
- Nginx location区别
- Nginx location匹配rewrite
- Nginx location详解
- Nginx location优先级
- Nginx location配置优先级