Apache 新增 Port error
BUBU 在設定時 apache
有報一個錯造成 apache
無法正常啟動
- 因為是在
httpd.conf
設定檔上新增加8080
port 造成啟動失敗,以下是錯誤內容
AH00526: Syntax error on line 47 of /etc/httpd/conf/httpd.conf:
Systemd socket activation is used, but this port is not configured in systemd
- google 了一下已有找到解套方試,要去
/usr/lib/systemd/system/httpd.socket.d
此目下新增加設定vim 10-listen8080.conf
# This file is part of mod_ssl. It enables listening on port 443 when
# socket activation is used.
[Socket]
ListenStream=8080
-
再回到
httpd.conf
確認要用的port
是否正確 -
重新載入設定
systemctl daemon-reload
systemctl stop httpd.socket
systemctl stop httpd.service
systemctl start httpd.socket
systemctl start httpd.service