

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

# 從 Windows Server 上的 .NET 平台遷移至 Elastic Beanstalk 上的 Linux 上的 .NET Core 平台
<a name="dotnet-linux-migration"></a>

您可以將在 [Windows Server 上的 .NET](https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html#platforms-supported.net) 平台上執行的應用程式遷移至 Linux 上的 .NET Core 平台。以下是從 Windows 遷移至 Linux 平台時的一些考量事項。

## 遷移至 Linux 上的 .NET Core 平台的考量事項
<a name="dotnet-linux-migration.considerations"></a>


|  **Area**  |  **變更和資訊**  | 
| --- | --- | 
| 應用程式組態 | 在 Windows 平台上，您可以使用[部署資訊清單](dotnet-manifest.md)來指定在環境中執行的應用程式。這些 Linux 上的 .NET Core 平台會使用 [Procfile](dotnet-linux-procfile.md) 指定在環境執行個體上執行的應用程式。如需綁定應用程式的詳細資訊，請參閱 [Linux Elastic Beanstalk 平台上 .NET Core 的綁定應用程式](dotnet-linux-platform-bundle-app.md)。 | 
| 代理伺服器 | 在 Windows 平台上，您可以使用 IIS 作為應用程式的代理伺服器。這些 Linux 上的 .NET Core 平台預設包含 nginx 做為反向代理程式。您可以選擇使用代理伺服器，並使用 Kestrel 作為您應用程式的 Web 伺服器。如需詳細資訊，請參閱 [設定代理伺服器](dotnet-linux-platform-nginx.md)。 | 
| 路由 | 在 Windows 平台上，您可以在應用程式碼中使用 IIS，並包含[部署資訊清單](dotnet-manifest.md)來設定 IIS 路徑。對於 Linux 上的 .NET Core 平台，您可以在應用程式碼中使用 [ASP .NET Core 路由](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-3.1)，並更新您環境的 nginx 組態。如需詳細資訊，請參閱 [設定代理伺服器](dotnet-linux-platform-nginx.md)。 | 
| 日誌 | Linux 和 Windows 平台會串流不同的日誌。如需詳細資訊，請參閱[Elastic Beanstalk 如何設定 CloudWatch Logs](AWSHowTo.cloudwatchlogs.md#AWSHowTo.cloudwatchlogs.loggroups)。 | 