0
0

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.などのnginx周りのファイルのエラーを知るコマンド

Posted at

sudo systemctl start nginxをしたら次のエラー

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

解決法
sudo nginx -tコマンドを使用する

sudo nginx -tを使用すると細かなミスに気がつくことができます。

systemctl status nginx.serviceだと起動に成功しているか、していないかを判別することしかできません。

sudo nginx -t

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] open() "/var/www/rails/Portfolio/current/log/nginx.access.log" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
[shogo@ip-10-0-0-193 Portfolio]$

この場合current/log/nginx.access.logファイルを作成すればok。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?