我在我的机器上安装了nginx
并且它安装正确但无法在我的机器中启动nginx
,每当我尝试启动nginx
时它会显示我提到的错误。每当我运行命令systemctl restart nginx && systemctl status nginx
我收到错误信息:
`Job for nginx.service failed because the control process exited with
error code.See "systemctl status nginx.service" and "journalctl -
xe" for details.`
执行命令后:qazxsw poi
以下输出产生:
systemctl status nginx.service
执行命令后: `nginx.service - The NGINX HTTP and reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; disabled; vendor
preset: e Active: failed (Result: exit-code) since Mon 2018-09-10
14:57:14 IST;32s ago Process: 6321 ExecStartPre=/usr/sbin/nginx -t
(code=exited ,status=203/EXEC)`
`Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]: Starting The NGINX HTT
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]: nginx.service: Control
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]: Failed to start The NG
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]: nginx.service: Unit en
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]: nginx.service: Failed`
,生成的输出为:
journalctl -xe
为此寻找解决方案,但没有发现任何..任何帮助将不胜感激。
错误日志: `-- Unit nginx.service has begun starting up.
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC
systemd[6321]:nginx.service: Fail
-- Subject: Process /usr/sbin/nginx could not be executed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The process /usr/sbin/nginx could not be executed and failed.
--
-- The error number returned by this process is 2.
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]:
nginx.service:
Control
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]: Failed to
start The NG
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit nginx.service has failed.
--
-- The result is failed.
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]: nginx.service: Unit en
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC systemd[1]:nginx.service: Failed
Sep 10 14:57:14 hk-HP-Pavilion-15-Notebook-PC polkitd(authority=local) [751]: Unr
Sep 10 14:57:46 hk-HP-Pavilion-15-Notebook-PC systemd[1] Configuration file /li
Sep 10 14:57:46 hk-HP-Pavilion-15-Notebook-PC systemd[1]:Configuration file /li`
就像上一个错误所说你使用的是端口80,检查端口80上是否有apache
用户命令:
netstat -tlpn