我使用的是 Ubuntu 14.04.01 和 Apache - 2.2.31。 在 httpd.conf 我有
User build
Group build
正在尝试启动 apache -
apache/logs$ cat stdout.log
httpd: bad user name build
在此之前我尝试运行:
. bin/envvars
当我创建本地用户“test”时
useradd -m test -G sudo -s /bin/bash
并在 httpd.conf 中指定它,然后我就可以启动 apache 了。 但是,我需要使用 LDAP 用户“构建”。
最佳答案
最后,我解决了这个问题:
sudo ltrace -f sh apachectl configtest 2>out.log
调查 out.log 文件中的输出并发现调用 - 'getpwnam("build")'
,它返回“0”。来自 documentation我知道“找不到给定的名称或 uid。”,但是当我调用“id build”时,我能够看到该用户存在以及该用户所属的网络组列表。然后我连接到另一个虚拟机,在那里我能够使用 LDAP 用户启动 apache 并运行
ldd bin/httpd
并比较输出。其中一个虚拟机缺少“libldap-2.3.so.0”
关于Apache 无法以 stdout.log 中的 - "bad user name"开头。我在 httpd.conf 中指定了 LDAP 用户。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42024859/