Apache-Httpd
Apache systemctl 啟動 httpd 失敗
我有一個帶有 apache2 網路伺服器的 Suse 系統。當我嘗試啟動 apache 時出現錯誤,當我詢問 apache2 的狀態時,我得到 httpd 未執行的資訊。所以現在我嘗試啟動 httpd
systemctl start httpd
但這不起作用,所以我問
systemctl status httpd
結果是:
httpd.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)
我怎樣才能啟動 httpd corecly ?
JdeBP 已經在這個方向上發表了評論,所以我想我會把它充實到一個答案中。
Apache 的 SUSE README部分說明:
尊敬的系統管理員,
SUSE Apache 軟體包提供了在一個系統上執行更多 Apache 程序實例的可能性。
一如既往,
systemctl start apache2
啟動伺服器的預設實例,它需要 /etc/sysconfig/apache2 中的 sysconfig 設置。如果這個文件不存在,或者裡面的 APACHE_HTTPD_CONF 沒有設置,那麼它需要 /etc/apache2/httpd.conf。
…這似乎指出了錯誤;當單元實際命名為“apache2”時,您嘗試啟動一個名為“httpd”的單元。這也與您看到的證據一致,其中說:
Reason: No such file or directory
…因為沒有 httpd.service 文件。