I’m trying to deploy my ASP.NET Core Web API to a cPanel-based hosting environment, but I’m not sure how to go about it.
Here’s what I’ve done so far:
-
Built my ASP.NET Core Web API in Visual Studio.
-
Published the project to a folder on my local machine using the “Folder” publish option in Visual Studio.
I’ve seen guides for deploying .NET Core applications to IIS or Azure, but nothing specific to cPanel.
Some questions I have:
-
What folder structure should I upload to cPanel?
-
How do I configure cPanel to serve the .NET Web API application ?
-
Are there specific settings or modules I need to enable for .NET Core to work on cPanel?
-
How do I handle environment variables or connection strings in this setup?
If anyone has experience deploying an ASP.NET Core Web API to cPanel or a similar hosting environment, I’d greatly appreciate your guidance.
1