我尝试配置我的网页 SSL 证书,配置后我重新启动了 Apache 服务,输出如下:
httpd24-httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd24-httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2018-11-27 12:32:27 EST; 23s ago
Process: 22104 ExecStop=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -k graceful-stop (code=exited, status=1/FAILURE)
Process: 22102 ExecStart=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 22102 (code=exited, status=1/FAILURE)
Nov 27 12:32:27 swlt.pok.ibm.com systemd[1]: Starting The Apache HTTP Server...
Nov 27 12:32:27 swlt.pok.ibm.com httpd-scl-wrapper[22102]: /opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper: line 7: /opt/rh/httpd24/service-environment: No such file or directory
Nov 27 12:32:27 swlt.pok.ibm.com systemd[1]: httpd24-httpd.service: main process exited, code=exited, status=1/FAILURE
Nov 27 12:32:27 swlt.pok.ibm.com httpd-scl-wrapper[22104]: /opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper: line 7: /opt/rh/httpd24/service-environment: No such file or directory
Nov 27 12:32:27 swlt.pok.ibm.com systemd[1]: httpd24-httpd.service: control process exited, code=exited status=1
Nov 27 12:32:27 swlt.pok.ibm.com systemd[1]: Failed to start The Apache HTTP Server.
Nov 27 12:32:27 swlt.pok.ibm.com systemd[1]: Unit httpd24-httpd.service entered failed state.
Nov 27 12:32:27 swlt.pok.ibm.com systemd[1]: httpd24-httpd.service failed.
我的 SSL 文件生成钥匙,韓規和质子泵。
我已经检查过该行:
/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper: line 7: /opt/rh/httpd24/service-environment: No such file or directory
这是我的文件 /opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper:
#!/bin/sh
. /opt/rh/httpd24/service-environment ##Line 7
for sclname in $HTTPD24_HTTPD_SCLS_ENABLED ; do
. /opt/rh/$sclname/enable
export X_SCLS="$X_SCLS $sclname"
done
exec /opt/rh/httpd24/root/usr/sbin/httpd "$@"
我想知道这个案例中发生了什么。谢谢。
答案1
信息很明确:/opt/rh/httpd24/service-environment
应该来源不##Line 7
存在(或者可能由于某些 SELinux 问题而无法读取)。