尝试启动Apache 2.4.37时出错

jmo0nnb3  于 2023-05-18  发布在  Apache
关注(0)|答案(1)|浏览(148)

我遇到了一些困难,让Apache在RHEL 8上运行。这是一个支持SVN升级的新示例,因为我们继承的旧服务器非常过时并且不兼容。我从旧环境中复制了配置并解决了大部分错误,但我在错误日志中得到了以下内容:

[Wed May 10 14:03:56.430759 2023] [core:notice] [pid 4483] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed May 10 14:03:56.432320 2023] [suexec:notice] [pid 4483] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed May 10 14:03:56.461205 2023] [mpm_prefork:notice] [pid 4483] AH00163: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k SVN/1.10.2 configured -- resuming normal operations
[Wed May 10 14:03:56.461261 2023] [core:notice] [pid 4483] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed May 10 14:05:26.429869 2023] [mpm_prefork:notice] [pid 4483] AH00170: caught SIGWINCH, shutting down gracefully

我研究了以前的一些解决方案,例如将下面的行添加到配置中(它没有以任何形式出现):

IncludeOptional sites-enabled/*

这样做后没有变化。
我也试着评论了SSLSessionCache,就像我在另一篇文章中看到的那样,没有运气。
没有http进程正在运行,尽管在它超时之前,我至少可以在浏览器中导航到IP时短暂地点击redhat着陆页。
编辑:对下面的答案进行了调整,但仍然遇到一些问题,可能与证书相关:

[Thu May 11 08:10:35.962326 2023] [ssl:info] [pid 43202] AH01887: Init: Initializing (virtual) servers for SSL
[Thu May 11 08:10:35.962992 2023] [ssl:info] [pid 43202] AH01876: mod_ssl/2.4.37 compiled against Server: Apache/2.4.37, Library: OpenSSL/1.1.1k
[Thu May 11 08:10:35.963031 2023] [suexec:notice] [pid 43202] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu May 11 08:10:35.981305 2023] [ldap:debug] [pid 43202] util_ldap.c(2441): AH01303: LDAP: SSL trusted global cert - /etc/pki/tls/certs/******.crt (type CA_BASE64)
[Thu May 11 08:10:35.981325 2023] [ldap:debug] [pid 43202] util_ldap.c(2604): AH01308: LDAP: SSL verify server certificate - FALSE
[Thu May 11 08:10:35.981858 2023] [ldap:debug] [pid 43202] util_ldap.c(3023): AH01316: LDAP merging Shared Cache conf: shm=0x55cacd992888 rmm=0x55cacd992988 for VHOST: ******.****.**
[Thu May 11 08:10:35.982015 2023] [ldap:info] [pid 43202] AH01318: APR LDAP: Built with OpenLDAP LDAP SDK
[Thu May 11 08:10:35.984499 2023] [ldap:info] [pid 43202] AH01319: LDAP: SSL support available
[Thu May 11 08:10:35.984987 2023] [socache_shmcb:debug] [pid 43202] mod_socache_shmcb.c(401): AH00821: shmcb_init allocated 512000 bytes of shared memory
[Thu May 11 08:10:35.984998 2023] [socache_shmcb:debug] [pid 43202] mod_socache_shmcb.c(417): AH00822: for 511912 bytes (512000 including header), recommending 32 subcaches, 88 indexes each
[Thu May 11 08:10:35.985002 2023] [socache_shmcb:debug] [pid 43202] mod_socache_shmcb.c(450): AH00824: shmcb_init_memory choices follow
[Thu May 11 08:10:35.985006 2023] [socache_shmcb:debug] [pid 43202] mod_socache_shmcb.c(452): AH00825: subcache_num = 32
[Thu May 11 08:10:35.985010 2023] [socache_shmcb:debug] [pid 43202] mod_socache_shmcb.c(454): AH00826: subcache_size = 15992
[Thu May 11 08:10:35.985014 2023] [socache_shmcb:debug] [pid 43202] mod_socache_shmcb.c(456): AH00827: subcache_data_offset = 2128
[Thu May 11 08:10:35.985018 2023] [socache_shmcb:debug] [pid 43202] mod_socache_shmcb.c(458): AH00828: subcache_data_size = 13864
[Thu May 11 08:10:35.985022 2023] [socache_shmcb:debug] [pid 43202] mod_socache_shmcb.c(460): AH00829: index_num = 88
[Thu May 11 08:10:35.985163 2023] [socache_shmcb:info] [pid 43202] AH00830: Shared memory socache initialised
[Thu May 11 08:10:35.985171 2023] [ssl:info] [pid 43202] AH01887: Init: Initializing (virtual) servers for SSL
[Thu May 11 08:10:35.985739 2023] [ssl:info] [pid 43202] AH01876: mod_ssl/2.4.37 compiled against Server: Apache/2.4.37, Library: OpenSSL/1.1.1k
[Thu May 11 08:10:35.992422 2023] [mpm_prefork:notice] [pid 43202] AH00163: Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k SVN/1.10.2 configured -- resuming normal operations
[Thu May 11 08:10:35.992441 2023] [mpm_prefork:info] [pid 43202] AH00164: Server built: Mar 28 2023 09:01:53
[Thu May 11 08:10:35.992455 2023] [core:notice] [pid 43202] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu May 11 08:10:35.992459 2023] [core:debug] [pid 43202] log.c(1571): AH02639: Using SO_REUSEPORT: yes (1)
[Thu May 11 08:10:35.992463 2023] [mpm_prefork:debug] [pid 43202] prefork.c(919): AH00165: Accept mutex: sysvsem (default: sysvsem)
[Thu May 11 08:10:35.993273 2023] [proxy:debug] [pid 43204] proxy_util.c(1939): AH00925: initializing worker proxy:reverse shared
[Thu May 11 08:10:35.993307 2023] [proxy:debug] [pid 43204] proxy_util.c(1999): AH00927: initializing worker proxy:reverse local
[Thu May 11 08:10:35.993332 2023] [proxy:debug] [pid 43204] proxy_util.c(2050): AH00931: initialized single connection worker in child 43204 for (*)
[Thu May 11 08:10:35.997414 2023] [proxy:debug] [pid 43205] proxy_util.c(1939): AH00925: initializing worker proxy:reverse shared
[Thu May 11 08:10:35.997446 2023] [proxy:debug] [pid 43205] proxy_util.c(1999): AH00927: initializing worker proxy:reverse local
[Thu May 11 08:10:35.997471 2023] [proxy:debug] [pid 43205] proxy_util.c(2050): AH00931: initialized single connection worker in child 43205 for (*)
[Thu May 11 08:10:36.000390 2023] [proxy:debug] [pid 43206] proxy_util.c(1939): AH00925: initializing worker proxy:reverse shared
[Thu May 11 08:10:36.000428 2023] [proxy:debug] [pid 43206] proxy_util.c(1999): AH00927: initializing worker proxy:reverse local
[Thu May 11 08:10:36.000457 2023] [proxy:debug] [pid 43206] proxy_util.c(2050): AH00931: initialized single connection worker in child 43206 for (*)
[Thu May 11 08:10:36.000948 2023] [proxy:debug] [pid 43207] proxy_util.c(1939): AH00925: initializing worker proxy:reverse shared
[Thu May 11 08:10:36.000982 2023] [proxy:debug] [pid 43207] proxy_util.c(1999): AH00927: initializing worker proxy:reverse local
[Thu May 11 08:10:36.001005 2023] [proxy:debug] [pid 43207] proxy_util.c(2050): AH00931: initialized single connection worker in child 43207 for (*)
[Thu May 11 08:10:36.002280 2023] [proxy:debug] [pid 43208] proxy_util.c(1939): AH00925: initializing worker proxy:reverse shared
[Thu May 11 08:10:36.002313 2023] [proxy:debug] [pid 43208] proxy_util.c(1999): AH00927: initializing worker proxy:reverse local
[Thu May 11 08:10:36.002337 2023] [proxy:debug] [pid 43208] proxy_util.c(2050): AH00931: initialized single connection worker in child 43208 for (*)
[Thu May 11 08:12:06.130122 2023] [core:info] [pid 43202] AH00096: removed PID file /etc/httpd/run/httpd.pid (pid=43202)
[Thu May 11 08:12:06.130189 2023] [mpm_prefork:notice] [pid 43202] AH00170: caught SIGWINCH, shutting down gracefully
iqxoj9l9

iqxoj9l91#

错误日志显示“SELinux策略启用”,所以如果你不能为Apache设置SELinux角色,你可能需要禁用它。
要在运行时禁用SELinux,请运行以下命令:

setenforce 0

要永久禁用它(在重新启动时)编辑文件:

/etc/selinux/config

更改行:

SELINUX=enforcing

收件人:

SELINUX=Disabled

相关问题