我尝试通过命令重新启动我的nginx服务器。
sudo service nginx restart.
它给我一个错误
* Restarting nginx nginx[fail]
当我签入error.log时,它会向我提供错误
2016/04/24 06:01:45 [emerg] 12852#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/04/24 06:01:45 [emerg] 12852#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/04/24 06:01:45 [emerg] 12852#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/04/24 06:01:45 [emerg] 12852#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/04/24 06:01:45 [emerg] 12852#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2016/04/24 06:01:45 [emerg] 12852#0: still could not bind()
2016/04/24 06:13:49 [alert] 15033#0: mmap(MAP_ANON|MAP_SHARED, 52428800) failed (12: Cannot allocate memory)
如何解决这个问题?
答案 0 :(得分:1)
您已有一个侦听该端口的进程。例如,它可能是apache,或者是其他Web服务器。关闭它并启动nginx