天天看點

nginx [emerg] socket() []80 failed (97 Address family not supported by protocol)

1、nginx報錯資訊

早上通過LNMP部署owncloud 10.0.2的雲盤環境,修改nginx配置檔案後,重新開機報錯:

nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

2、分析并解決報錯

看到 socket() [::]:80 failed,第一反應就是好像與IPV6有關,Address family not supported by protocol也進一步印證了我的想法,如是想到檢視nginx配置檔案

修改nginx的配置檔案:

<code>vim </code><code>/etc/nginx/nginx</code><code>.conf</code>

如果不知道nginx的配置檔案在哪,可以通過find指令或者rpm -ql nginx(rpm形式安裝的話)進行查找nginx.conf

<code># rpm -ql nginx|grep nginx.conf</code>

<code>/etc/nginx/nginx</code><code>.conf</code>

<code>/etc/nginx/nginx</code><code>.conf.default</code>

重新啟動nginx,告警消失

本文轉自 冰凍vs西瓜 51CTO部落格,原文連結:http://blog.51cto.com/molewan/1942907,如需轉載請自行聯系原作者

繼續閱讀