Key Points of running ASP. NET on Apache 1. Why not use IIS
When I use Asp.net to develop web pages, selecting IIS for servers is definitely the best web page deployment solution. It seems nonsense to say this, because they are all Microsoft's own products. Of course, it will be better to combine them. However, I encountered a situation where I considered non-IIS Asp.net deployment solutions.
The operating system I use is WINXP and ghost xp. When installed, IIS is not installed by default, to download an independent IIS installation package or use the original system disk to add this IIS component to the control panel. In such an unprofessional environment, there are many IIS problems (for example, IIS may be unavailable when some patches are updated by the system). Sometimes, even if IIS is reinstalled, at this time, we only need to reinstall the system, so it is especially annoying. Especially after using the system for a while, we have installed a lot of software and really don't want to reinstall the system. So now I think of Asp.net server building options outside of IIS.
Key Points of running ASP. NET on apache ii. files required
1. phpnow. (Including PHP, Apache, and MySQL, As long as Apache is used ,......)
2. Microsoft. NET Framework.
3. Asp.net module of Apache.
Key Points of running ASP. NET on Apache 3. configuration process
1. Install Microsoft. NET Framework. The installation will be completed after the next step.
2. Install the Apache server. Decompress the phpnow installation package and run Setup. just install cmd (for details about the installation method, refer to my other tutorial "using Zend studio + phpnow + Zend debugger to build a PHP server debugging environment"). because I plan to use the php web page again, I used the phpnow Integrated Installation Package instead of installing Apache separately.
3. Install the Asp.net module of Apache. Install the downloaded installation file. The installer will initialize and automatically find the Apache installation directory. If you find any error, You can manually adjust it. (Note: The mod_aspdotnet version must correspond to the Apache version installed by yourself ). Finally, configure APACHE-20/CONF/httpd. CONF file, open this file with notepad, append the following configuration node at the end of the file, and start with "#" as the comment part. Also, change the directory in the corresponding configuration to your actual directory.
The following Apache configuration method and comments are from the network, which is unknown to the author.
1 # Asp.net supports 2 # these two configurations are global configurations, which can be placed after other response loadmodule/addhandler statement blocks. 3 # In my configuration, the entire configuration block is placed at the end, not separated, this is also to facilitate the management of 4 loadmodule aspdotnet_module "modules/modules" 5 addhandler Asp.net asax ascx ashx asmx aspx axd config CS csproj licx REM resources resx soap VB vbproj vsdisco webinfo 6 7 # configuration can be placed in the VM 8 <ifmodule mod_aspdotnet.cpp> 9 10 # mount the Asp.net example application 11 # aspnetmount Equivalent to the mount command in Linux, it is to mount the ASP program directory to a URL address 12 # if not the entire website uses ASP, it should not be mounted under. For example, aspnetmount/asptool "d :\\ www \ apache2 \ htdocs \ aspweb" 13 # Note: The Global DocumentRoot is "D: /www/apache2/htdocs/aspweb "14 aspnetmount/" D: /phpnow/htdocs "15 16 # map all requests for/active to the Application Files 17 # It means to map all requests to '/asptool' to 18 under the mounted ASP program directory # In my configuration, the following is the 19 # Alias/asptool "d commented out: /www/apache2/htdocs/aspweb "20 21 # Allow Asp.net scripts to be executed in the active example 22 <directory" D: /phpnow/htdocs "> 23 options followsymlinks execcgi 24 order allow, deny 25 allow from all 26 directoryindex default.htm default. aspx index.html index. aspx 27 </directory> 28 # For all virtual Asp.net webs, we need the aspnet_client files 29 # To serve the client-side helper scripts. 30 31 # Note: The following two lines must correspond. net Framework installation directory 32 aliasmatch/aspnet_client/system_web/(\ D +) _ (\ D + )/(. *) "C:/win2003/Microsoft. net/framework/V $1. $2. $3/asp. netclientfiles/$4 "33 34 <directory" C:/Windows/Microsoft. net/framework/V */asp. netclientfiles "> 35 options followsymlinks 36 order allow, deny 37 allow from all 38 </directory> 39 40 </ifmodule> 41 # Asp.net supports end.
Key Points of running ASP. NET on Apache 4. Running and testing website instances
After completing the above installation and configuration, you can now put your own simple Asp.net site program or the simple Asp.net site program downloaded to the Apache website directory (htdocs directory ), enter http: // 127.0.0.1 in the browser to access the site. For more information, see my other tutorial "using Zend studio + phpnow + Zend debugger to build a PHP server debugging environment". Here, why do I emphasize the need to test a "simple" website? I found that there are still some problems in this running environment. Please refer to the fifth point below.
Key points for running ASP. NET on Apache 5. Problems
In the above-established Asp.net runtime environment, I tested the easy-to-use sitefactory CMS and found that there were many problems and it was impossible to run normally. It is understood that this server environment is correct. the Identity Authentication Mode of net is not supported. In addition, I also found that the support for sub-directories also encountered some strange problems. Therefore, we can conclude that this runtime environment is defective and should be used with caution, you can try it on a small website or a small test.