1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.の解決法

Last updated at Posted at 2020-09-30

問題

本番環境でアプリケーションをデプロイしようとしている途中。
Nginxを起動できない。

エラー

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
[アプリケーションのディレクトリ]$ systemctl status nginx.service
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 水 2020-09-30 06:32:13 UTC; 9s ago
  Process: 31655 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE)
  Process: 31652 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 31651 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

解決手順

Apatcheを停止したら

/ディレクトリで

$ sudo apachectl stop

Nginxを起動できました🎉

sudo service nginx start

ApatcheとNginxは競合してはいけないんですね。

参考記事

CentOS7でNginXを起動する
コマンドラインからapacheを起動/停止/再起動する

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?