質問編集履歴

2

修正依頼にもとづき修正させていただきました。

2020/01/22 02:36

投稿

okubo
okubo

スコア18

test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  - 下記ページを参考にlet's encryptでSSL化
20
20
 
21
-  https://centossrv.com/apache-certbot.shtml
21
+  [https://centossrv.com/apache-certbot.shtml](https://centossrv.com/apache-certbot.shtml)
22
22
 
23
23
  - 80,443ポートは開放
24
24
 

1

自分で調査した結果の追記編集をしました。

2020/01/22 02:36

投稿

okubo
okubo

スコア18

test CHANGED
File without changes
test CHANGED
@@ -347,3 +347,71 @@
347
347
 
348
348
 
349
349
  よろしくお願いします。
350
+
351
+
352
+
353
+
354
+
355
+ ### 追記
356
+
357
+
358
+
359
+ その後、調べてみた追記となります。
360
+
361
+
362
+
363
+ httpへアクセスするとhttpsにリダイレクトしてしまう設定が問題を起こしているのかもしれないと思い、
364
+
365
+ httpd.conf内に書いてあった
366
+
367
+
368
+
369
+ > <VirtualHost *:80>
370
+
371
+ > ServerAdmin root@〇〇〇〇〇.com
372
+
373
+ > DocumentRoot /var/www/html
374
+
375
+ > ServerName 〇〇〇〇〇.com
376
+
377
+ > RewriteEngine on
378
+
379
+ > RewriteCond %{SERVER_NAME} =〇〇〇〇〇.com
380
+
381
+ > RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
382
+
383
+ > </VirtualHost>
384
+
385
+
386
+
387
+ のRewrite関連の部分を
388
+
389
+ #RewriteEngine on
390
+
391
+ #RewriteCond %{SERVER_NAME} =〇〇〇〇〇.com
392
+
393
+ #RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanen
394
+
395
+
396
+
397
+ にしてみて
398
+
399
+  certbot certonly --webroot -w /var/www/html -m アドレス -d ドメイン --agree-tos
400
+
401
+ を試してみたのですが
402
+
403
+ ダメでした・・
404
+
405
+
406
+
407
+ なお、httpでアクセスするとinternalservererrorになり、well-known/も同様にinternalservererrorとなりました。
408
+
409
+
410
+
411
+ let's encryptのwel-knownの部分のエラーも「404Not Found」から「500 Internal Server」に変わったのですが、
412
+
413
+ このあたりは関係してきますでしょうか。
414
+
415
+
416
+
417
+ 何もわからずすみません。