我已經使用「apk添加nginx」在Alpine上安裝了nginx。出於某種原因,系統啓動時。 Nginx崩潰。我查了日誌中 /var/log/nginx/error.logs,這是輸出:Nginx在啓動時崩潰
2016/07/27 12:54:59 [emerg] 7944#0: bind() to 0.0.0.0:80 failed (98: Address in use)
2016/07/27 12:54:59 [emerg] 7944#0: bind() to 0.0.0.0:8080 failed (98: Address in use)
2016/07/27 12:54:59 [emerg] 7944#0: still could not bind()
當我使用須藤netstat的-nltup | grep的:80
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 5264/nginx.conf
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 5033/nginx.conf
tcp 0 0 :::80 :::* LISTEN 5033/nginx.conf
我使用 sudo的定影-k 8080/TCP殺害的過程在8080。死亡進程的ID是。即使在那之後,我運行 sudo service nginx start。給了我同樣的錯誤:
* Starting nginx ...
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)
nginx: [emerg] still could not bind()
* start-stop-daemon: failed to start `/usr/sbin/nginx'
* Failed to start nginx
* ERROR: nginx failed to start
所以你殺了:8080點的過程,但不是80? –
您使用的是什麼操作系統和控制面板? –
在'/ etc/nginx/sites-enabled'中檢查你的配置' –