启动服务时:systemctl restart httpd.service,报错:
● httpd.service – httpd service
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit–code) since 五 2023-02-24 16:18:50 CST; 25s ago
Process: 125838 ExecStop=/bin/sh –c /usr/sbin/apachectl –f /etc/httpd/httpd.conf –k stop (code=exited, status=0/SUCCESS)
Process: 125836 ExecStartPost=/bin/sh –c /usr/bin/chown apache:apache -R /usr/local/apache2/logs/httpd.pid (code=exited, status=1/FAILURE)
Process: 125832 ExecStart=/bin/sh –c /usr/sbin/apachectl –f /etc/httpd/httpd.conf –k 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进行投诉反馈,一经查实,立即删除!