问题描述:
今天我在阿里云服务器上配置 nginx ,刚安装好nginx
sudo apt install nginx
使用默认配置,运行
sudo nginx # 启动nginx
报错如下:
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
然后我运行
sudo nginx -t # 检查nginx的配置是否正确
报错如下:
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
nginx: configuration file /etc/nginx/nginx.conf test failed
系统信息:
OS: Debian 9.2 stretch
Kernel: x86_64 Linux 4.9.0-4-amd64
问题分析 在 /etc/nginx/sites-enabled/default 文件中,有 ```conf server{ liste