

AWS App Runner 不再開放給新客戶。現有客戶可以繼續正常使用該服務。如需詳細資訊，請參閱[AWS App Runner 可用性變更](https://docs.aws.amazon.com/apprunner/latest/dg/apprunner-availability-change.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# HTTP/HTTPS 請求路由錯誤
<a name="request-route-404-troubleshoot"></a>

本節說明如何疑難排解和解決將 HTTP/HTTPS 流量路由至 App Runner 服務端點時可能遇到的錯誤。

## 404 將 HTTP/HTTPS 流量傳送至 App Runner 服務端點時發生錯誤
<a name="request-route-404-troubleshoot.404"></a>
+  確認 `Host Header` 指向 HTTP 請求中的服務 URL，因為 App Runner 會使用主機標頭資訊來路由請求。`cURL`和 Web 瀏覽器等大多數用戶端會自動將主機標頭指向服務 URL。如果您的用戶端未將服務 URL 設定為 `Host Header`，您會收到`404 Not Found`錯誤。  
**Example 主機標頭不正確**  

  ```
  $ ~ curl -I -H "host: foobar.com" https://testservice.awsapprunner.com/
  HTTP/1.1 404 Not Found
  transfer-encoding: chunked
  ```  
**Example 正確的主機標頭**  

  ```
  $ ~ curl -I -H "host: testservice.awsapprunner.com" https://testservice.awsapprunner.com/
  HTTP/1.1 200 OK
  content-length: 11772
  content-type: text/html; charset=utf-8
  ```
+  確認您的用戶端已針對路由至公有或私有服務的請求正確設定伺服器名稱指標 (SNI)。對於 TLS 終止和請求路由，App Runner 會在 HTTPS 連線中使用 SNI 集。