質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
nginx

nginixは軽量で高性能なwebサーバーの1つです。BSD-likeライセンスのもとリリースされており、あわせてHTTPサーバ、リバースプロキシ、メールプロキシの機能も備えています。MacOSX、Windows、Linux、上で動作します。

Q&A

解決済

2回答

5301閲覧

nginxが起動できない。

nao0628

総合スコア10

nginx

nginixは軽量で高性能なwebサーバーの1つです。BSD-likeライセンスのもとリリースされており、あわせてHTTPサーバ、リバースプロキシ、メールプロキシの機能も備えています。MacOSX、Windows、Linux、上で動作します。

0グッド

1クリップ

投稿2019/08/26 08:39

「Let's Encrypt 」を更新するために
一度nginxを下記コマンドで止めたら
「systemctl stop nginx」

「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.」
と表示され
「systemctl status nginx.service」
を入力したところ

「nginx.service - The NGINX HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 月 2019-08-26 17:33:06 JST; 43s ago
Process: 32602 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Process: 15917 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
Process: 1993 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
Main PID: 15919 (code=exited, status=0/SUCCESS)

8月 26 17:33:06 hoge nginx[1993]: nginx: [emerg] "server" directive is not allowed here in /etc/nginx/conf.d...nf:117
8月 26 17:33:06 hoge nginx[1993]: nginx: configuration file /etc/nginx/nginx.conf test failed
8月 26 17:33:06 hoge systemd[1]: nginx.service: control process exited, code=exited status=1
8月 26 17:33:06 hoge systemd[1]: Failed to start The NGINX HTTP and reverse proxy server.
8月 26 17:33:06 hoge systemd[1]: Unit nginx.service entered failed state.
8月 26 17:33:06 hoge systemd[1]: nginx.service failed.
Hint: Some lines were ellipsized, use -l to show in full.


気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

8月 26 17:33:06 hoge nginx[1993]: nginx: [emerg] "server" directive is not allowed here in /etc/nginx/conf.d...nf:117

この設定ファイルの117行目のserver directiveが許可されていない場所に書いてあるようですね。

投稿2019/08/26 09:13

scsi

総合スコア2840

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

hoge.jp_ssl.conf ファイルに問題があったようなので
取り急ぎ、そのファイルを削除したら起動できました。

投稿2019/08/26 10:21

nao0628

総合スコア10

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問