apache httpd:在自定义ServerRoot中错误地搜索模块

vdgimpew  于 2022-11-16  发布在  Apache
关注(0)|答案(1)|浏览(107)

我在Centos 7上启动了httpd 2.4,在systemd中使用了一个自定义的ServerRoot /a/B/httpd:

Environment="OPTIONS=-d /a/b/httpd"

但是httpd尝试在$ServerRoot/modules/中查找模块:

httpd: Syntax error on line 3 of /a/b/httpd/conf/httpd.conf: Syntax error on line 6 of 
/a/b/httpd/conf.modules.d/00-base.conf: Cannot load modules/mod_access_compat.so into server: 
/a/b/httpd/modules/mod_access_compat.so: cannot open shared object file: Not a directory

00-base.conf的第6行是:

LoadModule access_compat_module modules/mod_access_compat.so

模块如下:

# rpm -ql httpd |grep compat
/usr/lib64/httpd/modules/mod_access_compat.so
#

我怎样才能告诉httpd在这里搜索模块?

ryevplcw

ryevplcw1#

在$ServerRoot中创建缺少的链接可修复所有问题:

lrwxrwxrwx 1 root root 14 Oct  3 14:25 logs -> /var/log/httpd
lrwxrwxrwx 1 root root 25 Oct  3 14:24 modules -> /usr/lib64/httpd/modules/
lrwxrwxrwx 1 root root 10 Oct  3 14:27 run -> /run/httpd

相关问题