run asp.net on apache [duplicate]

2019-02-11 13:24发布

问题:

This question already has an answer here:

  • How to run ASP.NET 4.0 website on Apache server? 3 answers

I want to run an ASP.NET site on Apache Server instead of IIS.

I've Googled a lot, but didn't find satisfactory answers. I only found out that we can use something called 'Mono' - a third party API for doing this. Can anyone explain the basics - for example, do we need to install install .NET on that server? What if it is a UNIX server?

Any detailed explanation, or links, if provided would be greatly appreciated.

回答1:

Mono is exactly what you're looking for, actually. It's an extremely mature and stable product that's been providing .NET Framework support on open systems for a very long time. mod_mono for Apache is specifically what you need.

To answer your questions:

  • The .NET Framework itself won't install on non-Windows machines. Mono is its replacement. So you don't need to install the .NET Framework from Microsoft.
  • Unix, Linux, etc. Shouldn't be a problem.


回答2:

Mono is an open-source version of the .Net Framework and can be integrated into Apache as described here:

http://www.mono-project.com/ASP.NET

I believe this is your only option.



回答3:

Here is a tutorial about mod_mono + apache configuration:

http://www.mono-project.com/Mod_mono

AFAIK mod_mono + Apache is only working with a linux machine, not a windows machine. It is not possible to install .net framework on linux.