読者です 読者をやめる 読者になる 読者になる

nginxが起動しない!!

logrotateがnginxが起動しないっすよ旦那!って感じのメールが届いたのでエラーログなど調べてみると

2013/02/25 14:21:46 [emerg] 26680#0: bind() to [::]:80 failed (98: Address already in use)
2013/02/25 14:21:46 [emerg] 26680#0: bind() to [::]:80 failed (98: Address already in use)
2013/02/25 14:21:46 [emerg] 26680#0: bind() to [::]:80 failed (98: Address already in use)
2013/02/25 14:21:46 [emerg] 26680#0: bind() to [::]:80 failed (98: Address already in use)
2013/02/25 14:21:46 [emerg] 26680#0: bind() to [::]:80 failed (98: Address already in use)
2013/02/25 14:21:46 [emerg] 26680#0: still could not bind()

上記のようなエラー吐いて起動できずにいたようです。

https://github.com/Keith2/lowendscript-ng/issues/2 上のリンクに書いてる内容を元にnginx.confを修正するとめでたく起動するようになりました。

server {
     listen 80 default_server; ## listen for ipv4
     listen [::]:80 default_server ipv6only=on; ## listen for ipv6
     server_name  _;
     access_log  /var/log/nginx/default.log;
     return 444;
}