質問するログイン新規登録

質問編集履歴

3

エラーに表示されているhttpd\.confの該当箇所の追記

2017/01/28 08:14

投稿

shutosg
shutosg

スコア20

title CHANGED
File without changes
body CHANGED
@@ -52,7 +52,7 @@
52
52
  ```
53
53
  長いので [こちら](https://gist.github.com/shutosg/6ea7dfa27b3a5721ad5a9342cedaa74e) に貼りました。
54
54
 
55
- apacheのログに関しては、以下の様に出ております。
55
+ apacheのログに関しては、最新のところが以下の様に出ております。
56
56
 
57
57
  ```
58
58
  # httpd_error_log
@@ -72,5 +72,16 @@
72
72
  [Sat Jan 28 02:01:15.643699 2017] [ssl:warn] [pid 10363] AH01909: RSA certificate configured for ***:***:***:***:***:***:443 does NOT include an ID which matches the server name
73
73
  ```
74
74
 
75
+ エラーメッセージにでている `/etc/httpd/conf/httpd.conf` の419行目ですが、以下のようなディレクティブが続いています。
76
+ ```
77
+ <VirtualHost *:443>
78
+ SSLEngine on
79
+ ServerName my_domain.net
80
+ ServerAlias www.my_domain.net
81
+ DocumentRoot /path/to/my/www/doc/
82
+ CustomLog logs/my_domain-access_log combined
83
+ ErrorLog logs/my_domain-error_log (上述のhttpd_error_logのこと)
84
+ </VirtualHost>
85
+ ```
75
86
 
76
87
  よろしくお願いします。

2

ログの追加

2017/01/28 08:14

投稿

shutosg
shutosg

スコア20

title CHANGED
File without changes
body CHANGED
@@ -52,4 +52,25 @@
52
52
  ```
53
53
  長いので [こちら](https://gist.github.com/shutosg/6ea7dfa27b3a5721ad5a9342cedaa74e) に貼りました。
54
54
 
55
+ apacheのログに関しては、以下の様に出ております。
56
+
57
+ ```
58
+ # httpd_error_log
59
+ [Sat Jan 28 03:02:49.229090 2017] [ssl:emerg] [pid 23700] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
60
+ [Sat Jan 28 03:03:21.043074 2017] [ssl:emerg] [pid 23755] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
61
+ [Sat Jan 28 03:03:59.848238 2017] [ssl:emerg] [pid 1120] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
62
+ [Sat Jan 28 03:04:34.333542 2017] [ssl:emerg] [pid 2719] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
63
+ [Sat Jan 28 03:06:14.654515 2017] [ssl:emerg] [pid 2796] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
64
+ [Sat Jan 28 03:07:55.335009 2017] [ssl:emerg] [pid 2865] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
65
+ [Sat Jan 28 03:09:16.934538 2017] [ssl:emerg] [pid 2940] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
66
+ [Sat Jan 28 03:11:41.539592 2017] [ssl:emerg] [pid 3020] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
67
+ [Sat Jan 28 03:16:12.647846 2017] [ssl:emerg] [pid 3160] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
68
+ [Sat Jan 28 03:26:53.674303 2017] [ssl:emerg] [pid 3417] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/httpd/conf/httpd.conf:419)
69
+
70
+ # ssl_error_log
71
+ [Sat Jan 28 02:01:15.643699 2017] [ssl:warn] [pid 10363] AH01909: RSA certificate configured for ***:***:***:***:***:***:443 does NOT include an ID which matches the server name
72
+ [Sat Jan 28 02:01:15.643699 2017] [ssl:warn] [pid 10363] AH01909: RSA certificate configured for ***:***:***:***:***:***:443 does NOT include an ID which matches the server name
73
+ ```
74
+
75
+
55
76
  よろしくお願いします。

1

タグの付与、書式の改善

2017/01/28 06:13

投稿

shutosg
shutosg

スコア20

title CHANGED
File without changes
body CHANGED
@@ -5,14 +5,24 @@
5
5
  CentOS Linux release 7.3.1611 (Core)
6
6
  Server version: Apache/2.4.6 (CentOS)
7
7
  # 経緯
8
- 既存の個人サイトをhttps対応にさせたくて、[http://knowledge.sakura.ad.jp/knowledge/5573/](http://knowledge.sakura.ad.jp/knowledge/5573/) や [http://weblabo.oscasierra.net/letsencrypt-2/](http://weblabo.oscasierra.net/letsencrypt-2/) などを参考に、Let's Encryptの証明書の発行を行い、 `/etc/httpd/conf/httpd.conf` と `/etc/httpd/conf.d/ssl.conf` を書き換えてみたのですが、いざapacheを `sudo systemctl restart httpd` としたところ、起動しなくなってしまいました。
8
+ 既存の個人サイトをhttps対応にさせたくて、
9
+ - [http://knowledge.sakura.ad.jp/knowledge/5573/](http://knowledge.sakura.ad.jp/knowledge/5573/)
10
+ - [http://weblabo.oscasierra.net/letsencrypt-2/](http://weblabo.oscasierra.net/letsencrypt-2/)
11
+
12
+ などを参考に、Let's Encryptの証明書の発行を行ったのち、
13
+
14
+
15
+ - `/etc/httpd/conf/httpd.conf`
16
+ - `/etc/httpd/conf.d/ssl.conf`
17
+
18
+ に証明書ファイルの場所やバーチャルホストの設定を書き加えたのですが、いざapacheを `sudo systemctl restart httpd` としたところ、起動しなくなってしまいました。
9
19
  ```
10
20
  $ sudo systemctl start httpd
11
21
 
12
22
  Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
13
23
  ```
14
24
 
15
- 設定ファイルのSyntax errorを疑って `apachectl configtest` を行ったところ、Syntnax errorで証明書ファイルが見つからないと出ていたのですが、それは証明書ファイルのあるディレクトリパーミッションが適切ではないことが原因だったようで、それを直して `Syntax OK` となったのですが、まだ起動しません。
25
+ 設定ファイルのSyntax errorを疑って `apachectl configtest` としたところ、Syntnax errorで証明書ファイルが見つからない言われたのですが、それは証明書ファイルのあるディレクトリパーミッションが適切ではないことが原因だったようで、それを直して `Syntax OK` となったのですが、まだ起動しません。
16
26
 
17
27
  ファイアーウォールの設定も、httpsを許可しています。
18
28
  ログなどを出してみたものの、ググっても解決せずでした。