PHP/7.2.11 缺少 apache2/logs/httpd.pid 文件

启动服务时: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后重启解决

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值