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

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

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

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Q&A

1回答

463閲覧

service httpdの失敗

t.isokawa

総合スコア6

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

0グッド

0クリップ

投稿2017/08/08 12:54

###前提・実現したいこと
自宅PCでWEBサーバを立てて勉強中です。
オレオレ証明書&秘密鍵を作成し、/etc/httpd/conf/に配置後、
service rehttpdとしたところ、エラーが出ました。
それまでhttpで接続できていたのが、接続不可となりました。

エラーメッセージ
[root@localhost ~]# service httpd start
Redirecting to /bin/systemctl start httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@localhost ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 火 2017-08-08 05:45:45 PDT; 8s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 47121 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 47118 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 47118 (code=exited, status=1/FAILURE)

Linuxについては初心者で、とても初歩的な質問で大変恐縮です。
切り分けに必要な情報が不足していれば、ご教示ください。

よろしくお願いします。

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

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

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

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

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

scsi

2017/08/08 13:07

/var/log/messages や /var/log/httpd 以下にエラーの原因が記述されていないでしょうか?
t.isokawa

2017/08/08 13:24

3nekoさん 早速の回答ありがとうございます。 アドバイスいただいたように、以下取得いたしました。 [root@localhost httpd]# cat error_log [Tue Aug 08 04:53:51.147197 2017] [core:notice] [pid 11383] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0 [Tue Aug 08 04:53:51.148294 2017] [suexec:notice] [pid 11383] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message [Tue Aug 08 04:53:51.161234 2017] [auth_digest:notice] [pid 11383] AH01757: generating secret for digest authentication ... [Tue Aug 08 04:53:51.162530 2017] [lbmethod_heartbeat:notice] [pid 11383] AH02282: No slotmem from mod_heartmonitor [Tue Aug 08 04:53:51.180796 2017] [mpm_prefork:notice] [pid 11383] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations [Tue Aug 08 04:53:51.180825 2017] [core:notice] [pid 11383] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Tue Aug 08 04:58:46.684371 2017] [autoindex:error] [pid 11386] [client 192.168.6.1:52261] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive [Tue Aug 08 05:21:18.503131 2017] [mpm_prefork:notice] [pid 11383] AH00170: caught SIGWINCH, shutting down gracefully と出ます。
hotta

2017/08/08 13:49 編集

質問欄のエラーメッセージ全体を範囲指定して<code>をクリックしてください。また、追加のログ情報もここや回答欄に書かずに、質問に追記してください。
scsi

2017/08/08 14:11

勉強中とのことなので、ログの場所はわかったと思いますので、error を自分の力で解消してみるのがよいと思います!
guest

回答1

0

3nekoさん

早速の回答ありがとうございます。
アドバイスいただいたように、以下取得いたしました。

[root@localhost httpd]# cat error_log
[Tue Aug 08 04:53:51.147197 2017] [core:notice] [pid 11383] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Tue Aug 08 04:53:51.148294 2017] [suexec:notice] [pid 11383] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Tue Aug 08 04:53:51.161234 2017] [auth_digest:notice] [pid 11383] AH01757: generating secret for digest authentication ...
[Tue Aug 08 04:53:51.162530 2017] [lbmethod_heartbeat:notice] [pid 11383] AH02282: No slotmem from mod_heartmonitor
[Tue Aug 08 04:53:51.180796 2017] [mpm_prefork:notice] [pid 11383] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Tue Aug 08 04:53:51.180825 2017] [core:notice] [pid 11383] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Tue Aug 08 04:58:46.684371 2017] [autoindex:error] [pid 11386] [client 192.168.6.1:52261] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
[Tue Aug 08 05:21:18.503131 2017] [mpm_prefork:notice] [pid 11383] AH00170: caught SIGWINCH, shutting down gracefully

と出ます。

投稿2017/08/08 13:23

t.isokawa

総合スコア6

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問