nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
生活随笔
收集整理的這篇文章主要介紹了
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
今天測試Docker下配置一個nginx模板的鏡像,裝好nginx后,使用nginx -t進行檢查,報錯如下:
| 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; 根據錯誤提示分析,監聽的方式可能不支持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 沒有報錯了,問題解決 |
?
本文轉自 冰凍vs西瓜 51CTO博客,原文鏈接:http://blog.51cto.com/molewan/1971551,如需轉載請自行聯系原作者 《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀
總結
以上是生活随笔為你收集整理的nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: wireshark 选择网络接口
- 下一篇: 论文笔记之:Graph Attentio