Amazon Linux2環境です。
以下を実行
$ sudo systemctl start httpd.service
以下のエラーが出てきました。
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[ec2-user@ip-w-x-y-z www]$ sudo systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code)
Docs: man:httpd.service(8)
Process: 3650 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 3650 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
: Starting The Apache HTTP Server...
: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
: no listening sockets available, shutting down
systemd[1]: httpd.service failed.
Address already in use: とあったのでプロセスを調べてみることにしてました。
$ sudo lsof -i | grep http
nginx 3109 root 6u IPv4 18588 0t0 TCP *:http (LISTEN)
nginx 3109 root 7u IPv6 18589 0t0 TCP *:http (LISTEN)
nginx 3110 nginx 6u IPv4 18588 0t0 TCP *:http (LISTEN)
nginx 3110 nginx 7u IPv6 18589 0t0 TCP *:http (LISTEN)
$ sudo kill -9 3109
を試してみましたが・・
$ sudo lsof -i | grep http
nginx 3109 root 6u IPv4 18588 0t0 TCP *:http (LISTEN)
nginx 3109 root 7u IPv6 18589 0t0 TCP *:http (LISTEN)
nginx 3110 nginx 6u IPv4 18588 0t0 TCP *:http (LISTEN)
nginx 3110 nginx 7u IPv6 18589 0t0 TCP *:http (LISTEN)
消えませんでした・・
どうすればApache起動できるようになるでしょうか?