Apache - 启动失败

Apache - 启动失败

我尝试重新加载 Apache 来部署我的 web 应用程序但收到错误:

simfree@SimFree:/var/www/FlaskApp$ sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

我检查了这些命令并收到这样的回应:

我认为这是主要问题,因为我无法启动 apache2,并且检查状态时收到以下信息:

simfree@SimFree:/var/www/FlaskApp$ systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
       └─apache2-systemd.conf
Active: failed (Result: exit-code) since Sat 2018-09-15 11:22:59 UTC; 4min 19s ago
Process: 25319 ExecStart=/usr/sbin/apachectl start (code=exited; status=1/FAILURE)

编辑:后来我得到这个作为附加行:

Sep 15 12:04:53 SimFree systemd[1]: Starting The Apache HTTP Server...
Sep 15 12:04:53 SimFree apachectl[25709]: AH00534: apache2: Configuration error: No MPM loaded.
Sep 15 12:04:53 SimFree apachectl[25709]: Action 'start' failed.
Sep 15 12:04:53 SimFree apachectl[25709]: The Apache error log may have more information.
Sep 15 12:04:53 SimFree systemd[1]: apache2.service: Control process exited, code=exited status=1
Sep 15 12:04:53 SimFree systemd[1]: apache2.service: Failed with result 'exit-code'.
Sep 15 12:04:53 SimFree systemd[1]: Failed to start The Apache HTTP Server.
Sep 15 12:14:06 SimFree systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.

和这个:

Sep 15 08:41:14 SimFree su[1621]: Successful su for root by simfree
Sep 15 08:41:14 SimFree su[1621]: + /dev/pts/0 simfree:root
Sep 15 08:41:14 SimFree su[1621]: pam_unix(su:session): session opened for user root by simfree(uid=1000)
Sep 15 08:41:14 SimFree su[1621]: pam_systemd(su:session): Cannot create session: Already running in a session
Sep 15 08:46:51 SimFree sshd[1714]: Received disconnect from <my ip> port 20250:11: disconnected by user
Sep 15 08:46:51 SimFree sshd[1714]: Disconnected from user simfree <my ip> port 20250
Sep 15 09:07:07 SimFree su[1621]: pam_unix(su:session): session closed for user root
Sep 15 10:16:08 SimFree sshd[20628]: Received disconnect from <my ip> port 20283:11: disconnected by user
Sep 15 10:16:08 SimFree sshd[20628]: Disconnected from user simfree <my ip> port 20283
# next 5 are errors
Sep 15 10:27:29 SimFree polkit-agent-helper-1[22438]: pam_unix(polkit-1:auth): authentication failure; logname= uid=1000 euid=0 tty= ruser=simfree rhost=  user=simfree
Sep 15 10:35:59 SimFree su[22462]: pam_unix(su:auth): authentication failure; logname=simfree uid=1000 euid=0 tty=/dev/pts/2 ruser=simfree rhost=  user=root
Sep 15 10:36:02 SimFree su[22462]: pam_authenticate: Authentication failure
Sep 15 10:36:02 SimFree su[22462]: FAILED su for root by simfree
Sep 15 10:36:02 SimFree su[22462]: - /dev/pts/2 simfree:root
Sep 15 10:36:11 SimFree su[22463]: Successful su for root by simfree
Sep 15 10:36:11 SimFree su[22463]: + /dev/pts/2 simfree:root
Sep 15 10:36:11 SimFree su[22463]: pam_unix(su:session): session opened for user root by simfree(uid=1000)
Sep 15 10:36:11 SimFree su[22463]: pam_systemd(su:session): Cannot create session: Already running in a session
Sep 15 10:39:50 SimFree su[1207]: pam_unix(su:session): session closed for user root
# error
Sep 15 10:40:39 SimFree sudo[22832]: pam_unix(sudo:auth): authentication failure; logname=simfree uid=1000 euid=0 tty=/dev/pts/3 ruser=simfree rhost=  user=simfree

有人能帮我吗?我正在寻找解决方案,但找不到。我尝试重新启动并重新加载,但没有任何帮助。

答案1

尝试添加LoadModule mpm_event_module modules/mod_mpm_event.sohttpd.conf其他 LoadModule 指令之上。

相关内容