簡體   English   中英

Apache2 在啟動時崩潰,但在手動啟動時不會

[英]Apache2 crash on boot, but not when started manually

我遇到了一個我根本不明白的有線問題:

我有一台家庭服務器,在 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

知道問題可能來自哪里嗎?

我得到了一些更新:

根據這篇文章,我的錯誤似乎是由於我在/etc/apache2/envvar中更改了 Apache2 的組和用戶: https://www.simplified.guide/apache/change-user-and-group

如果我將用戶和用戶組改回 www-data,它會再次起作用。 但是,我想從 www-data 以外的其他用戶運行 Apache2。 這可能嗎?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM