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

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

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

Apacheは、Apache HTTP Serverの略で、最も人気の高いWebサーバソフトウェアの一つです。安定性が高いオープンソースソフトウェアとして商用サイトから自宅サーバまで、多くのプラットフォーム向けに開発・配布されています。サーバーソフトウェアの不具合(NCSA httpd)を修正するパッチ(a patch)を集積、一つ独立したソフトウェアとして開発されました。

Q&A

解決済

1回答

2684閲覧

[apache] service httpd startできない

kosuke_ikeura

総合スコア19

Apache

Apacheは、Apache HTTP Serverの略で、最も人気の高いWebサーバソフトウェアの一つです。安定性が高いオープンソースソフトウェアとして商用サイトから自宅サーバまで、多くのプラットフォーム向けに開発・配布されています。サーバーソフトウェアの不具合(NCSA httpd)を修正するパッチ(a patch)を集積、一つ独立したソフトウェアとして開発されました。

1グッド

1クリップ

投稿2020/03/12 03:13

環境
CentOS7
virtual box Vagrant
rails5

表題通り、service httpd startができません。
以下ログです。

[vagrant@localhost ~]$ sudo service httpd restart Redirecting to /bin/systemctl restart 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.
[vagrant@localhost ~] $sudo service httpd restart Redirecting to /bin/systemctl restart 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. [vagrant@localhost ~]$ systemctl status httpd.service ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since 木 2020-03-12 03:05:52 UTC; 15s ago Docs: man:httpd(8) man:apachectl(8) Process: 9738 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 9614 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=1/FAILURE) Process: 9737 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 9737 (code=exited, status=1/FAILURE)
[vagrant@localhost ~]$ sudo journalctl -xu httpd.service -- Logs begin at 木 2020-03-12 00:54:32 UTC, end at 木 2020-03-12 03:06:43 UTC. -- 3月 12 02:17:41 localhost.localdomain systemd[1]: Starting The Apache HTTP Server... -- Subject: Unit httpd.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit httpd.service has begun starting up. 3月 12 02:17:41 localhost.localdomain httpd[9437]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'Serv 3月 12 02:17:42 localhost.localdomain systemd[1]: Started The Apache HTTP Server. -- Subject: Unit httpd.service has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit httpd.service has finished starting up. -- -- The start-up result is done. 3月 12 02:19:00 localhost.localdomain systemd[1]: Reloading The Apache HTTP Server. -- Subject: Unit httpd.service has begun reloading its configuration -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit httpd.service has begun reloading its configuration 3月 12 02:19:00 localhost.localdomain httpd[9488]: httpd: Could not open configuration file /etc/httpd/conf/httpd.conf: Permission denied 3月 12 02:19:00 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 3月 12 02:19:00 localhost.localdomain systemd[1]: Reload failed for The Apache HTTP Server. -- Subject: Unit httpd.service has finished reloading its configuration -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit httpd.service has finished reloading its configuration -- -- The result is failed. 3月 12 02:26:54 localhost.localdomain systemd[1]: Reloading The Apache HTTP Server. -- Subject: Unit httpd.service has begun reloading its configuration -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit httpd.service has begun reloading its configuration 3月 12 02:26:54 localhost.localdomain httpd[9614]: httpd: Could not open configuration file /etc/httpd/conf/httpd.conf: Permission denied 3月 12 02:26:54 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 3月 12 02:26:54 localhost.localdomain systemd[1]: Reload failed for The Apache HTTP Server. -- Subject: Unit httpd.service has finished reloading its configuration -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit httpd.service has finished reloading its configuration --

色々調べたのですが、なぜエラーが起きているのかはわからず。。
もしエラーの原因がわかれば教えていただければ幸いです。
また、皆さんはどうやってApacheなどを学ばれたのか教えていただきたいです。
よろしくお願い致します。

s.k👍を押しています

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

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

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

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

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

guest

回答1

0

ベストアンサー

httpd: Could not open configuration file /etc/httpd/conf/httpd.conf: Permission denied

httpd.confのパーミッションを確認して適切に設定してください。

投稿2020/03/12 03:21

Y.H.

総合スコア7914

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

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

退会済みユーザー

退会済みユーザー

2020/03/12 03:43

オーナーやグループが変更されていないかもチェックして必要なら元に戻さないと。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.47%

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

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

質問する

関連した質問