lighttpd启动失败,提示lighttpd.service: main process exited, code=exited, status=255/n/a的解决方法

centos 7.3 64bit system1Um免费资源网

——————————————————————1Um免费资源网

Restart Lighttpd Server faild1Um免费资源网

Error message :1Um免费资源网

lighttpd.service: main process exited, code=exited, status=255/n/a1Um免费资源网

How to fix 'lighttpd.service: main process exited, code=exited, status=255/n/a' error ?1Um免费资源网

1.u should check the directory whether permissions is 755 (not including log files within this directory)1Um免费资源网

2.check log files within the directory /var/log/lighttpd/ whether the group and user are 'lighttpd lighttpd'1Um免费资源网

(Pay attention to using the commend above……if u use different groups and users to compile Lighttpd code, u should use your Lighttpd's own group and user!!)1Um免费资源网

If not, use the following command to repair:1Um免费资源网

chown lighttpd:lighttpd /var/log/lighttpd/access.log1Um免费资源网

chown lighttpd:lighttpd /var/log/lighttpd/error.log1Um免费资源网

———————————————————————————1Um免费资源网

lighttpd启动时提示:1Um免费资源网

  Started Lightning Fast Webserver With Light System Requirements.  Starting Lightning Fast Webserver With Light System Requirements...  lighttpd.service: main process exited, code=exited, status=255/n/a  Unit lighttpd.service entered failed state.  lighttpd.service failed.

分析原因:由于日志文件不可写,造成lighttpd无法正常启动,解决办法如下:1Um免费资源网

首先检查目录/var/log/lighttpd的权限是否为755,组及用户是否为lighttpd lighttpd1Um免费资源网

其次,如果正确,继续检查目录下的日志文件组及用户是否为 lighttpd lighttpd1Um免费资源网

最后,排查到日志access.log和error.log的用户及组为root root 导致lighttpd无法写入日志文件1Um免费资源网

使用以下命令修改其为 lighttpd lighttpd1Um免费资源网

  chown lighttpd:lighttpd /var/log/lighttpd/access.log  chown lighttpd:lighttpd /var/log/lighttpd/error.log

重启成功!1Um免费资源网

《免费共享资源》本网站内容收集于互联网,不承担任何由于内容的合法性及健康性所引起的争议和法律责任。
免费共享资源网 » lighttpd启动失败,提示lighttpd.service: main process exited, code=exited, status=255/n/a的解决方法

发表评论

提供最优质的资源集合

立即查看 了解详情