在 ubuntu 中启动 apache2 服务器时出错
Error while starting apache2 server in ubuntu
systemctl 启动apache2.service
出现此错误:-
apache2.service 的作业失败,因为控制进程已退出并显示错误代码。
有关详细信息,请参阅 "systemctl status apache2.service" 和 "journalctl -xe"。
systemctl 状态日志apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2020-06-02 08:24:55 IST; 49s ago
Process: 9759 ExecStart=/usr/sbin/apachectl start (code=exited, status=127)
Jun 02 08:24:55 GS-4996 systemd[1]: Starting The Apache HTTP Server...
Jun 02 08:24:55 GS-4996 apachectl[9759]: /usr/sbin/apachectl: 174: /usr/sbin/apachectl: /usr/sbin/apache2: not found
Jun 02 08:24:55 GS-4996 apachectl[9759]: Action 'start' failed.
Jun 02 08:24:55 GS-4996 apachectl[9759]: The Apache error log may have more information.
Jun 02 08:24:55 GS-4996 systemd[1]: apache2.service: Control process exited, code=exited status=127
Jun 02 08:24:55 GS-4996 systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 02 08:24:55 GS-4996 systemd[1]: Failed to start The Apache HTTP Server.
能否附上错误日志或 "systemctl status apache2.service"
的输出
看起来 apache2 文件在服务器上不可用。
/usr/sbin/apache2 由 apache2-bin 提供。 apache2-bin 是 apache2 包的依赖项,因此没有它 apache2 将无法正常工作。打开终端并输入:
sudo apt install --reinstall apache2-bin
sudo service apache2 start
我的最佳解决方案无需重启.. 经过长时间的 se :)
sudo apt-get --reinstall install apache2-bin
第 1 步:停止 nginx 并启动 apache
就是这样。
service nginx stop
systemctl restart postgresql
systemctl restart apache2
systemctl status apache2.service
systemctl 启动apache2.service
出现此错误:-
apache2.service 的作业失败,因为控制进程已退出并显示错误代码。 有关详细信息,请参阅 "systemctl status apache2.service" 和 "journalctl -xe"。
systemctl 状态日志apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2020-06-02 08:24:55 IST; 49s ago
Process: 9759 ExecStart=/usr/sbin/apachectl start (code=exited, status=127)
Jun 02 08:24:55 GS-4996 systemd[1]: Starting The Apache HTTP Server...
Jun 02 08:24:55 GS-4996 apachectl[9759]: /usr/sbin/apachectl: 174: /usr/sbin/apachectl: /usr/sbin/apache2: not found
Jun 02 08:24:55 GS-4996 apachectl[9759]: Action 'start' failed.
Jun 02 08:24:55 GS-4996 apachectl[9759]: The Apache error log may have more information.
Jun 02 08:24:55 GS-4996 systemd[1]: apache2.service: Control process exited, code=exited status=127
Jun 02 08:24:55 GS-4996 systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 02 08:24:55 GS-4996 systemd[1]: Failed to start The Apache HTTP Server.
能否附上错误日志或 "systemctl status apache2.service"
的输出看起来 apache2 文件在服务器上不可用。 /usr/sbin/apache2 由 apache2-bin 提供。 apache2-bin 是 apache2 包的依赖项,因此没有它 apache2 将无法正常工作。打开终端并输入:
sudo apt install --reinstall apache2-bin
sudo service apache2 start
我的最佳解决方案无需重启.. 经过长时间的 se :)
sudo apt-get --reinstall install apache2-bin
第 1 步:停止 nginx 并启动 apache
就是这样。
service nginx stop
systemctl restart postgresql
systemctl restart apache2
systemctl status apache2.service