當(dāng)前位置:
首頁 >
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
發(fā)布時(shí)間:2025/7/14
30
豆豆
生活随笔
收集整理的這篇文章主要介紹了
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
今天測試Docker下配置一個(gè)nginx模板的鏡像,裝好nginx后,使用nginx -t進(jìn)行檢查,報(bào)錯(cuò)如下:
| 1 2 3 4 | [root@a381c4c04132?yum.repos.d]#?nginx?-t nginx:?the?configuration?file?/etc/nginx/nginx.conf?syntax?is?ok nginx:?[emerg]?socket()?[::]:80?failed?(97:?Address?family?not?supported?by?protocol) nginx:?configuration?file?/etc/nginx/nginx.conf?test?failed |
檢查配置文件:
| 1 2 3 4 5 6 7 8 9 10 11 12 | ????server?{ ????????listen???????80?default_server; ????????listen???????[::]:80?default_server; 根據(jù)錯(cuò)誤提示分析,監(jiān)聽的方式可能不支持ipv6,于是將其注釋掉 ????server?{ ????????listen???????80?default_server; #????????listen???????[::]:80?default_server; 然后再次檢查配置: [root@a381c4c04132?yum.repos.d]#?nginx?-t nginx:?the?configuration?file?/etc/nginx/nginx.conf?syntax?is?ok nginx:?configuration?file?/etc/nginx/nginx.conf?test?is?successful 沒有報(bào)錯(cuò)了,問題解決 |
?
本文轉(zhuǎn)自 冰凍vs西瓜 51CTO博客,原文鏈接:http://blog.51cto.com/molewan/1971551,如需轉(zhuǎn)載請自行聯(lián)系原作者 《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀
總結(jié)
以上是生活随笔為你收集整理的nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: wireshark 选择网络接口
- 下一篇: 论文笔记之:Graph Attentio