Khởi tạo Cloudfront cho Web Server
- Truy cập AWS Management Console
- Tìm Cloudfront
- Chọn Cloudfront
![cloudfront](/images/setupcloudfront/setup-cloud-front-01.png?featherlight=false&width=90pc)
- Trong giao diện Cloudfront
- Chọn Create a Cloudfront Distribution
![cloudfront](/images/setupcloudfront/setup-cloud-front-02.png?featherlight=false&width=90pc)
- Trong giao diện Create
- Origin domain chọn Load Balancer domain
![cloudfront](/images/setupcloudfront/setup-cloud-front-03.png?featherlight=false&width=90pc)
- Tiếp theo để mọi thứ mặc định và chọn Create distribution
![cloudfront](/images/setupcloudfront/setup-cloud-front-04.png?featherlight=false&width=90pc)
- Sau khi tạo thành công Cloudfront Distribution quá trình khởi tạo khoảng 5 phút.
- Lưu lại giá trị Distribution Domain Name để tiến hành cài đặt ở bước tiếp theo
![cloudfront](/images/setupcloudfront/setup-cloud-front-05.png?featherlight=false&width=90pc)
- Trong giao diện Wordpress wp-admin
![cloudfront](/images/setupcloudfront/setup-cloud-front-06.png?featherlight=false&width=90pc)
- Trong giao diện Plugin của Wordpress
- Gõ vào ô tìm kiếm: WP Faster Cache
- Chọn Install now
![cloudfront](/images/setupcloudfront/setup-cloud-front-07.png?featherlight=false&width=90pc)
- Sau khi cài đặt thành công quay trở lại giao diện Plugin
- Chọn Plugin
- Tìm WP Faster Cache và chọn setting
![cloudfront](/images/setupcloudfront/setup-cloud-front-08.png?featherlight=false&width=90pc)
- Trong giao diện WP Faster Cache
- Chọn CDN trên thanh công cụ
- Tiếp chọn Orther CDN Providers
![cloudfront](/images/setupcloudfront/setup-cloud-front-09.png?featherlight=false&width=90pc)
- Một hộp thoại xuất hiện tiến hành nhập
- CDN Url: <địa chỉ Cloudfront distribution mà bạn vừa tạo ở bước trước đó>
- Origin Url: <địa chỉ dns ipv4 của ec2 instance webserver>
![cloudfront](/images/setupcloudfront/setup-cloud-front-10.png?featherlight=false&width=90pc)
- Tiếp tục chọn Next trong các bước tiếp theo cho tới finish
![cloudfront](/images/setupcloudfront/setup-cloud-front-11.png?featherlight=false&width=90pc)
- Sau khi thiết lập hoàn tất
![cloudfront](/images/setupcloudfront/setup-cloud-front-12.png?featherlight=false&width=90pc)
Vậy là quá trình cài đặt CDN cho Wordpress đã hoàn tất.