httpd サーバが起動しない。停止もできない。とかっていエラーへの対処。 原因はSSLの設定由来でした。
httpd サーバが立ち上がらない。
/etc/init.d/httpd がstopできない、restart, startもできない。
という状態が発生。
結論から言うと、原因は、
sslでパスワードを入力しないままでいると、
httpdサーバが認証されないまま 80 番ポートを使って半分起動したような状態になってしまう。これが邪魔していた可能性が高いと。
トラブルシューティング方法:
まず、エラーメッセージを確認。
[root@centos cgi-bin]# /etc/init.d/httpd restart
httpd を停止中: [失敗]
httpd を起動中: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.56.10 for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[失敗]
/etc/init.d/httpd stop
できないのは原因すら不明。
今度は、エラーログをみてみる。
ssl関連のエラーはssl_error_logに格納してある。
tail -f /var/log/httpd/error_log
tail -f /var/log/httpd/ssl_error_log
をチェック。
なんも手がかりなし。
そしたら、
とかでhttpd関連のプロセスで変なもんを見つけて、
kill [プロセス番号]
で殺す。
再度、
/etc/init.d/httpd restart
かけるとうまくいった。
これのお陰で ssl とか嫌いになったので、
この設定ファイルを非アクティブにしておく。
/etc/httpd/conf.d
にある
ssl.conf
の形式を変更することでこいつを非アクティブにしてやる。
ssl.conf-はなんでもいい。"fuckyoussl"
とかにしてもいい。
でもめんどいのでssl.conf-
にした。
以上のし。