iT邦幫忙

0

啟動selinux後httpd無法啟動

  • 分享至 

  • xImage

各位大大好
我在伺服器(os:centos7)啟動selinux後,開啟httpd出現了問題,(selinux關閉,可以正常啟動httpd)
錯誤訊息如下

[root@localhost ~]# systemctl status httpd -l
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 四 2022-03-10 14:29:02 CST; 43s ago
     Docs: man:httpd.service(8)
  Process: 2473 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 2473 (code=exited, status=1/FAILURE)
   Status: "Reading configuration..."

 3月 10 14:29:02 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
 3月 10 14:29:02 localhost.localdomain httpd[2473]: AH00112: Warning: DocumentRoot [/var/www/html/phpMyAdmin] does not exist
 3月 10 14:29:02 localhost.localdomain httpd[2473]: [Thu Mar 10 14:29:02.889593 2022] [alias:warn] [pid 2473:tid 140143884703936] AH00671: The Alias directive in /etc/httpd/conf.d/autoindex.conf at line 21 will probably never match because it overlaps an earlier Alias.
 3月 10 14:29:02 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
 3月 10 14:29:02 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
 3月 10 14:29:02 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
 3月 10 14:29:02 localhost.localdomain systemd[1]: httpd.service failed.

httpd error_log 如下

[root@localhost ~]# tail /var/log/httpd/error_log
[Thu Mar 10 11:56:12.400899 2022] [core:emerg] [pid 2329:tid 139984463284416] (13)Permission denied: AH00023: Couldn't create the ssl-cache mutex
AH00016: Configuration Failed
[Thu Mar 10 13:59:58.537139 2022] [core:notice] [pid 2406:tid 139709151226048] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Mar 10 13:59:58.537862 2022] [suexec:notice] [pid 2406:tid 139709151226048] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Mar 10 13:59:58.537956 2022] [core:emerg] [pid 2406:tid 139709151226048] (13)Permission denied: AH00023: Couldn't create the ssl-cache mutex
AH00016: Configuration Failed
[Thu Mar 10 14:17:24.529544 2022] [core:notice] [pid 2452:tid 140409843648704] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Mar 10 14:17:24.531402 2022] [suexec:notice] [pid 2452:tid 140409843648704] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Mar 10 14:17:24.531473 2022] [core:emerg] [pid 2452:tid 140409843648704] (13)Permission denied: AH00023: Couldn't create the ssl-cache mutex
AH00016: Configuration Failed

看起來問題好像是

Permission denied: AH00023: Couldn't create the ssl-cache mutex
AH00016: Configuration Failed

不曉得是哪個目錄或檔案的安全性本文或rwd權限沒有設定好?或是要修改selinux policy? 才能成功啟動httpd
再麻煩各位大大協助,謝謝!

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答