我无法说出它何时开始,因为我最近搬家了,刚刚完成实验室的设置。虽然在使用我的 NGINX/Apache 服务器启动虚拟机时,我进行了 yum 更新,Apache 也升级了,但现在它不再启动,也没有发出错误。我不能说它是在升级之前还是之后发生的,也不记得我运行的旧版本。我知道缺乏信息可能没有帮助……通常,当我遇到语法问题或缺少模块等时,它会通知我。我还检查了下面的 PID 的 audit.log,那里也没有任何东西,所以我也不相信 SELinux 会阻止它。
提前感谢任何建议。
May 31 01:33:16 webserver.home systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
May 31 01:33:16 webserver.home systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
May 31 01:33:16 webserver.home kill[10202]: kill: cannot find process ""
May 31 01:33:16 webserver.home systemd[1]: httpd.service: control process exited, code=exited status=1
May 31 01:33:16 webserver.home systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
May 31 01:33:16 webserver.home systemd[1]: Unit httpd.service entered failed state.
May 31 01:33:16 webserver.home systemd[1]: httpd.service failed.
[root@webserver /]# httpd -V
Server version: Apache/2.4.6 (CentOS)
Server built: May 12 2016 10:27:23
Server's Module Magic Number: 20120211:24
Server loaded: APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
[root@webserver /]# httpd -t
Syntax OK
[root@webserver /]# httpd -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
alias_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
dumpio_module (shared)
expires_module (shared)
headers_module (shared)
log_config_module (shared)
logio_module (shared)
mime_magic_module (shared)
mime_module (shared)
remoteip_module (shared)
rewrite_module (shared)
setenvif_module (shared)
unixd_module (shared)
dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)
lua_module (shared)
mpm_prefork_module (shared)
proxy_module (shared)
lbmethod_bybusyness_module (shared)
lbmethod_byrequests_module (shared)
lbmethod_bytraffic_module (shared)
lbmethod_heartbeat_module (shared)
proxy_ajp_module (shared)
proxy_balancer_module (shared)
proxy_connect_module (shared)
proxy_express_module (shared)
proxy_fcgi_module (shared)
proxy_fdpass_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_scgi_module (shared)
proxy_wstunnel_module (shared)
systemd_module (shared)
cgi_module (shared)
php5_module (shared)
答案1
我最终在 error_log 中找到了错误,虽然我最初在审计日志中没有看到任何内容,但似乎由于 SELinux 它没有权限访问虚拟主机的日志文件。