centos6.5启动nginx报错

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

解决方案

vim /etc/nginx/conf.d/default.conf

listen 80 default_server;
listen [::]:80 default_server;

改为:
listen 80;
#listen [::]:80 default_server;

重新启动nginx即可,网上说的那种kill掉nginx进程和ipv6 on的方法不适用

你可能感兴趣的:(nginx,centos)