linux - (apache2.service 的作业失败,因为控制进程退出并出现错误代码)在尝试激活 webdav 模块后发生

标签 linux apache ubuntu webdav

我试图启动我的 apache 网络服务器,但我不能。每次我输入:sservice apache2 start我得到错误:Job for apache2.service failed because the control process exited with error code.我在尝试为 apache2 激活 WebDAV 模块后第一次遇到错误。但我已经停用了它。我也重新启动了服务器,但没有效果。
我在我的第二台电脑上运行 apache 并通过 SSH 访问它。
这是我的日志文件:

--
-- A start job for unit phpsessionclean.service has begun execution.
--
-- The job identifier is 1448.
Jul 28 18:39:31 Server-MS-7B28 systemd[1]: phpsessionclean.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit phpsessionclean.service has successfully entered the 'dead' state.
Jul 28 18:39:31 Server-MS-7B28 systemd[1]: Finished Clean php session files.
-- Subject: A start job for unit phpsessionclean.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit phpsessionclean.service has finished successfully.
--
-- The job identifier is 1448.
Jul 28 18:40:25 Server-MS-7B28 sshd[2785]: Received disconnect from 222.186.31.166 port 58094:11:  [preauth]
Jul 28 18:40:25 Server-MS-7B28 sshd[2785]: Disconnected from 222.186.31.166 port 58094 [preauth]
Jul 28 18:40:37 Server-MS-7B28 sshd[2787]: Received disconnect from 112.85.42.104 port 12119:11:  [preauth]
Jul 28 18:40:37 Server-MS-7B28 sshd[2787]: Disconnected from 112.85.42.104 port 12119 [preauth]
Jul 28 18:41:43 Server-MS-7B28 sudo[2793]: pam_unix(sudo:auth): Couldn't open /etc/securetty: Datei oder Verzeichnis nicht gefunden
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: pam_unix(sudo:auth): Couldn't open /etc/securetty: Datei oder Verzeichnis nicht gefunden
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: elias-server : TTY=pts/0 ; PWD=/home/elias-server ; USER=root ; COMMAND=/bin/bash
Jul 28 18:41:46 Server-MS-7B28 sudo[2793]: pam_unix(sudo:session): session opened for user root by elias-server(uid=0)
Jul 28 18:41:53 Server-MS-7B28 audit[2808]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=2808 comm="apparmor_parser"
Jul 28 18:41:53 Server-MS-7B28 audit[2808]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=28>
Jul 28 18:41:53 Server-MS-7B28 kernel: audit: type=1400 audit(1595954513.320:3245): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine" pi>
Jul 28 18:41:53 Server-MS-7B28 kernel: audit: type=1400 audit(1595954513.320:3246): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/usr/lib/snapd/snap-confine//mo>
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: Starting The Apache HTTP Server...
-- Subject: A start job for unit apache2.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit apache2.service has begun execution.
--
-- The job identifier is 1515.
Jul 28 18:42:09 Server-MS-7B28 apachectl[2837]: AH00526: Syntax error on line 32 of /etc/apache2/sites-enabled/000-default.conf:
Jul 28 18:42:09 Server-MS-7B28 apachectl[2837]: Invalid command 'DAV', perhaps misspelled or defined by a module not included in the server configuration
Jul 28 18:42:09 Server-MS-7B28 apachectl[2817]: Action 'start' failed.
Jul 28 18:42:09 Server-MS-7B28 apachectl[2817]: The Apache error log may have more information.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit apache2.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: apache2.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Jul 28 18:42:09 Server-MS-7B28 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: A start job for unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit apache2.service has finished with a failure.
--
-- The job identifier is 1515 and the job result is failed.
谢谢您的帮助,
埃利亚斯

最佳答案

如果端口 80 已在使用中,则可能会发生这种情况。
refer the link for more
您可以使用它来检查是否有东西正在使用该端口。

netstat -plant | grep 80

关于linux - (apache2.service 的作业失败,因为控制进程退出并出现错误代码)在尝试激活 webdav 模块后发生,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63139106/

相关文章:

ubuntu - 缺少 .cshrc 文件

c - 使用unix域套接字并共享fd

ios - 在 Linux 中开始 iPhone 应用程序开发?

apache - 使用 mod_rewrite 匹配奇数或偶数

javascript - Apache 上的 Phantom Js

java - 'java.util.concurrent.ExecutionException : org. apache.catalina.LifecycleException:'

Linux Shell - 查找前 k 个进程

linux - Linux 中的音频流管理

linux - 奇怪的 POSIX 信号量行为(卡在 Linux 上的 sem_wait 上)

ubuntu - Tensorflow 2.9 nvidia 图形兼容性问题