nginx启动报错80端口号已占用()

开启或重启Nginx时报如下错误:

Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

原因是端口号80被其它程序或文件占用了

杀死占用端口号:

sudo fuser -k 80/tcp

sudo fuser -k 80/tcp

————————

开启或重启Nginx时报如下错误:

Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

原因是端口号80被其它程序或文件占用了

杀死占用端口号:

sudo fuser -k 80/tcp

sudo fuser -k 80/tcp