Apache2在启动时崩溃,但手动启动时不崩溃。

问题描述 投票:0回答:1

我遇到了一个我完全不明白的有线问题。

我有一台家用服务器,在Ubuntu 18.04上安装了Apache2。我的问题是,Apache2在系统重启时一直崩溃。

systemctl status apache2 给我。

● 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 2020-05-23 13:42:31 CEST; 3min 52s ago
Process: 1183 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 1224 (code=exited, status=1/FAILURE)

mai 23 13:42:30 potato-server systemd[1]: Starting The Apache HTTP Server...
mai 23 13:42:30 potato-server systemd[1]: Started The Apache HTTP Server.
mai 23 13:42:31 potato-server systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
mai 23 13:42:31 potato-server systemd[1]: apache2.service: Failed with result 'exit-code'.

超级诡异的是,当我做一个手动的时候 sudo systemctl start apache2,服务器启动。和apache2ctl configtest给我。

Syntax OK

你知道问题可能来自哪里吗?

apache web server apache2
1个回答
0
投票

我得到了一些更新。

看来我的错误是由于我在系统中更改了Apache2的组和用户。etcapache2envvar,根据此帖。https:/www.simplified.guideapachechange-user-and-group

如果我把用户和用户组改回www-data,它又能工作了。然而,我想从www-data以外的其他用户运行Apache2。这可能吗?

© www.soinside.com 2019 - 2024. All rights reserved.