Asp.net core is open source and run on any os like Linux, Windows and Mac. my question is. is it possible to run asp.net core application run on apache server publish on not on IIS server on Windows operating system. thanks in advance.
You cannot host a . NET Core application on Apache on Windows. What you can do is to use Kestrel with a reverse proxy such as describe in this article.
Apache is now set up to forward requests made to http://localhost:80 to the ASP.NET Core app running on Kestrel at http://127.0.0.1:5000 . However, Apache isn't set up to manage the Kestrel process. Use systemd and create a service file to start and monitor the underlying web app.
ASP.NET hosting with ApacheThe mod_mono Apache module is used to run ASP.NET applications within the Apache web server. The mod_mono module runs within an Apache process and passes all the requests to ASP.NET applications to an external Mono process that actually hosts your ASP.NET applications.
There is no Apache mod to run ASP.NET Core application, however you can setup Apache or Nginx to be a reverse proxy for ASP.NET Core application running on Kestrel web server. This is actually what Microsoft recommends to do in production environment primarily for security reasons. For more details take a look at this article. To see how exactly configure Apache reverse proxy take a look here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With