启动服务时:systemctl restart httpd.service报错

httpd.servicehttpd service

Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)

Active: failed (Result: exitcode) since 五 2023-02-24 16:18:50 CST; 25s ago

Process: 125838 ExecStop=/bin/shc /usr/sbin/apachectl –f /etc/httpd/httpd.confk stop (code=exited, status=0/SUCCESS)

Process: 125836 ExecStartPost=/bin/shc /usr/bin/chown apache:apache -R /usr/local/apache2/logs/httpd.pid (code=exited, status=1/FAILURE)

Process: 125832 ExecStart=/bin/shc /usr/sbin/apachectl –f /etc/httpd/httpd.confk start (code=exited, status=0/SUCCESS)

Main PID: 40137 (code=exited, status=0/SUCCESS)

2月 24 16:18:50 localhost.zpd.com systemd[1]: Starting httpd service

2月 24 16:18:50 localhost.zpd.com sh[125836]: /usr/bin/chown: 无法访问“/usr/local/apach目录

2月 24 16:18:50 localhost.zpd.com systemd[1]: httpd.service: control process exited, co…=1

2月 24 16:18:50 localhost.zpd.com systemd[1]: Failed to start httpd service.

2月 24 16:18:50 localhost.zpd.com systemd[1]: Unit httpd.service entered failed state.

2月 24 16:18:50 localhost.zpd.com systemd[1]: httpd.service failed.

Hint: Some lines were ellipsized, use -l to show in full.

查看/usr/local/apache2/logs目录下只有两个文件没有 httpd.pid创建一个文件然后写入一个数字ID值,如:28976后重启解决

原文地址:https://blog.csdn.net/yfy1907/article/details/129204926

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_49863.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注