Ssl

無法使用 https 訪問 S3 靜態網站

  • January 8, 2021

我已按照https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-https-requests-s3/中的所有步驟操作,但仍然無法使用 https 訪問我的網站。

  1. 我的證書已成功頒發給域 admin.studentqr.com,如此處所示 我的證書已成功頒發,如此處所示
  2. 我的雲端似乎也可以正常工作 在此處輸入圖像描述 在此處輸入圖像描述
  3. 我已經更新了 Route 53 中的 admin.studentqr.com 記錄以指向雲端 在此處輸入圖像描述
  4. 我的域是在 Wix 下註冊的,所以我有 admin.studentqr.com 的 CNAME 指向我的 S3 在此處輸入圖像描述

但是,我仍然只能訪問http://admin.studentqr.com>而不能訪問<https://admin.studentqr.com

我還有什麼想念的嗎?

由於我的域在 Wix 下,我需要更新子域的 CNAME 以指向給定的 * .cloudfront.net而不是我的 S3 儲存桶。如果您在訪問您的網站時遇到以下錯誤,請等待幾分鐘

403 ERROR
The request could not be satisfied.
Bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront)

嘗試使用https://stackoverflow.com/questions/59693199/route53-and-cloudfront-the-request-could-not-be-satisfied中給出的解決方案

這基本上確保您將域/子域添加到 Cloudfront 備用域名並檢查 Cloudfront 配置中的 Http 和 Https

引用自:https://serverfault.com/questions/1048131