mac上配置Nginx出错处理

sudo nginx 后出现下面的报错:

nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use)

nginx: [emerg] still could not bind()

原因:端口被占了

处理步骤:

1.打开浏览器,输入localhost:8080 发现打开的页面不是it works

2.本例显示jenkins欢迎页面,说明被jenkins占了

3.双击这个文件/Library/Application Support/Jenkins/Uninstall.command  卸载jenkins

4.重新nginx,问题解决

你可能感兴趣的:(mac上配置Nginx出错处理)