【docker】アパッチを起動するとエラー??
dockerでalmalinux入れて、httpd落として、さあ作業しようと思ったら
なぜか、動いていない。。?
あれと思い確認
[root@acce9005da04 /]# systemctl status httpd
× httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: timeout) since Wed 2025-07-16 14:33:37 JST; 7min ago
Docs: man:httpd.service(8)
Process: 36 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 36 (code=exited, status=0/SUCCESS)
Jul 16 14:32:06 acce9005da04 systemd[1]: Starting The Apache HTTP Server…
Jul 16 14:33:36 acce9005da04 systemd[1]: httpd.service: start operation timed out. Terminating.
Jul 16 14:33:37 acce9005da04 systemd[1]: httpd.service: Failed with result ‘timeout’.
Jul 16 14:33:37 acce9005da04 systemd[1]: Failed to start The Apache HTTP Server.
なんだこれは
スタートしてみても
[root@85ae61a0e844 /]# systemctl start httpd
このまましばらく固まる???
そしてエラーがでる
「
Job for httpd.service failed because a timeout was exceeded.
See “systemctl status httpd.service” and “journalctl -xeu httpd.service” for details.
」
わからない。
初めての症状
色々調べて原因判明
どうも
env\conf\httpd.conf
に
LoadModule systemd_module modules/mod_systemd.so
を入れないとだめだったらしい。
今回他からプロジェクト先の
httpd.conf
を持ってきて入れたのが原因だ。
とりあえずこれを書いて、docker建て直すして確認
[root@2b86ee423cf8 /]# systemctl status httpd
● httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: active (running) since Wed 2025-07-16 16:02:25 JST; 13s ago
Docs: man:httpd.service(8)
Main PID: 36 (httpd)
Status: “Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec: 0 B/sec”
CGroup: /docker/2b86ee423cf8ce2750b797544890e02e94d487581196a80100a9fcbfda6eb6b4/system.slice/httpd.service
直った!!
スタートしてみても一瞬で変わる
[root@2b86ee423cf8 /]# systemctl start httpd
[root@2b86ee423cf8 /]#
よかったよかった。
なぜプロジェクト先のhttpd.confになかったのかは考えない事に。。
-0 Comment-