回答編集履歴

1

回答の追記

2018/02/23 03:33

投稿

nullbot
nullbot

スコア910

test CHANGED
@@ -19,3 +19,29 @@
19
19
 
20
20
 
21
21
  を参考にして修正してみてください。
22
+
23
+
24
+
25
+ ■追記
26
+
27
+ もう一点忘れていました。ELBでSSLターミネーションをするので後ろのWEBサーバーはHTTPアクセスになります。以下の設定をwp_config.phpに加えてください。
28
+
29
+
30
+
31
+ ```
32
+
33
+ if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
34
+
35
+ $_SERVER['HTTPS'] = 'on';
36
+
37
+ ```
38
+
39
+
40
+
41
+ 参考
42
+
43
+ [https://docs.aws.amazon.com/ja_jp/elasticloadbalancing/latest/classic/x-forwarded-headers.html](https://docs.aws.amazon.com/ja_jp/elasticloadbalancing/latest/classic/x-forwarded-headers.html)
44
+
45
+
46
+
47
+ [https://codex.wordpress.org/Function_Reference/is_ssl](https://codex.wordpress.org/Function_Reference/is_ssl)