0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

CloudFrontでALBをオリジンにする際のあれこれ

Last updated at Posted at 2025-02-08

はじめに

CloudFrontからWordpressを配信する際に詰まった点を挙げていきます。
作成方法は以下をご参照ください。
Wordpress環境を進化させたい(構成編)
Wordpress環境を進化させたい(構築編)

ネームサーバーの更新

独自で発行したドメインをRoute53に登録する際にホストゾーンを作成すると思います。Route53はNSレコードで自動でネームサーバーを提供してくれますが、登録済みドメインのネームサーバーと一致していない場合、ドメインが機能しなくなります。

スクリーンショット 2025-02-08 121913.png
スクリーンショット 2025-02-08 121841.png

オリジンの設定

Route53 AレコードのエイリアスでALBにルーティングした場合にはオリジンドメインはALBが提供するDNS名ではなく、紐付けた独自ドメインを設定する必要があります。
スクリーンショット 2025-02-02 160345.png

Wordpressのconfig

もし管理画面にアクセスできず、wordpressのGUIでドメインを指定できない場合はwordpressインストール先のconfigファイルで指定することができます。

define('WP_HOME','https://xxxxxxxx.com');
define('WP_SITEURL','https://xxxxxxxx.com');

最後に

次回は同じ環境を作成できるCloudFrontのテンプレートを作成してみたいと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?