更新后 Apache 无法启动
Apache doesn't start after update
我在 CentOS 7 上 运行 很少。一切正常,直到使用 yum update
进行全面更新。无法启动 Apache。
我尝试了所有方法,包括删除和重新安装 httpd。
我得到的错误是:
**systemctl status httpd.service**
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-07-09 20:50:18 CEST; 34min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 5785 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 5785 (code=exited, status=1/FAILURE)
Jul 09 20:50:18 vps.xyz.com systemd[1]: Starting The Apache HTTP Server...
Jul 09 20:50:18 vps.xyz.com httpd[5785]: [Thu Jul 09 20:50:18.618214 2020] [so:warn] [pid 5785] AH01574: module systemd_module is already ...skipping
Jul 09 20:50:18 vps.xyz.com httpd[5785]: AH00526: Syntax error on line 1 of /etc/httpd/conf/httpd.conf:
Jul 09 20:50:18 vps.xyz.com httpd[5785]: Invalid command '\xef\xbb\xbfServerRoot', perhaps misspelled or defined by a module not included ...guration
Jul 09 20:50:18 vps.xyz.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 09 20:50:18 vps.xyz.com systemd[1]: Failed to start The Apache HTTP Server.
Jul 09 20:50:18 vps.xyz.com systemd[1]: Unit httpd.service entered failed state.
Jul 09 20:50:18 vps.xyz.com systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
无论我如何编辑 httpd.conf,它总是显示相同的 \xef\xbb\xbf 错误。
看起来像是编码问题。您能否编码 httpd.conf 文件的类型。应该是UTF-8 Unicode文本
file httpd.conf
即
[test@test bin]# file /etc/httpd/conf/httpd.conf
/etc/httpd/conf/httpd.conf: UTF-8 Unicode text
在 Notepad++ 上,您可以使用“编码”->“以不带 BOM 的 UTF-8 编码”选项将其删除
我在 CentOS 7 上 运行 很少。一切正常,直到使用 yum update
进行全面更新。无法启动 Apache。
我尝试了所有方法,包括删除和重新安装 httpd。
我得到的错误是:
**systemctl status httpd.service**
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-07-09 20:50:18 CEST; 34min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 5785 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 5785 (code=exited, status=1/FAILURE)
Jul 09 20:50:18 vps.xyz.com systemd[1]: Starting The Apache HTTP Server...
Jul 09 20:50:18 vps.xyz.com httpd[5785]: [Thu Jul 09 20:50:18.618214 2020] [so:warn] [pid 5785] AH01574: module systemd_module is already ...skipping
Jul 09 20:50:18 vps.xyz.com httpd[5785]: AH00526: Syntax error on line 1 of /etc/httpd/conf/httpd.conf:
Jul 09 20:50:18 vps.xyz.com httpd[5785]: Invalid command '\xef\xbb\xbfServerRoot', perhaps misspelled or defined by a module not included ...guration
Jul 09 20:50:18 vps.xyz.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 09 20:50:18 vps.xyz.com systemd[1]: Failed to start The Apache HTTP Server.
Jul 09 20:50:18 vps.xyz.com systemd[1]: Unit httpd.service entered failed state.
Jul 09 20:50:18 vps.xyz.com systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
无论我如何编辑 httpd.conf,它总是显示相同的 \xef\xbb\xbf 错误。
看起来像是编码问题。您能否编码 httpd.conf 文件的类型。应该是UTF-8 Unicode文本
file httpd.conf
即
[test@test bin]# file /etc/httpd/conf/httpd.conf
/etc/httpd/conf/httpd.conf: UTF-8 Unicode text
在 Notepad++ 上,您可以使用“编码”->“以不带 BOM 的 UTF-8 编码”选项将其删除