Since the server needs to publish several web sites such as JSP, PHP and ASP, Apache is sure to support JSP and PHP. In view of the open spirit of Apache, ASP. NET should also support, so Google. The configuration steps are as follows:
1. Download ASP. NET Parsing module (mod_aspdotnet)
: http://sourceforge.net/projects/mod-aspdotnet/, direct installation. In the. \apache\modules directory, a module named Mod_aspdotnet.so appears.
2. Configure Apache to enable it to support this module
Create the configuration file mod_aspdotnet.conf, saved in the \apache\conf directory, with the following contents:
[Plain]View PlainCopy
- # ASP.
- LoadModule Aspdotnet_module modules/mod_aspdotnet.so
- AddHandler ASP asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo
- <ifmodule mod_aspdotnet.cpp>
- # Mount The ASP. Example Application
- Aspnetmount/aspnet "F:/demo"
- # MAP all requests for/active to the application files
- Alias/aspnet "F:/demo"
- # Allow ASP. Scripts to being executed in the active example
- <directory "F:/demo" >
- Options FollowSymLinks execcgi
- Order Allow,deny
- Allow from all
- DirectoryIndex index.aspx Default.aspx index.html
- </Directory>
- # for all virtual ASP webs, we need the aspnet_client files
- # to serve the Client-side helper scripts.
- aliasmatch/aspnet_client/system_web/(\d+) _ (\d+) _ (\d+) _ (\d+)/(. *) \ "C:/windows/microsoft.net/framework/v$1.$2.$3 /asp. Netclientfiles/$4 "
- <directory "C:/windows/microsoft.net/framework/v*/asp.netclientfiles" >
- Options FollowSymLinks
- Order Allow,deny
- Allow from all
- </Directory>
- </IfModule>
Note: The following two sentences cannot be wrapped, and the site local path cannot contain Chinese characters.
AddHandler ASP asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo
aliasmatch/aspnet_client/system_web/(\d+) _ (\d+) _ (\d+) _ (\d+)/(. *) \ "C:/windows/microsoft.net/framework/v$1.$2.$3 /asp. Netclientfiles/$4 "
And then add the httpd.conf file to the end
[Plain]View PlainCopy
- #mod_aspdotnet Support
- Include conf/mod_aspdotnet.conf
Finally, restart Apache.
3. Testing
Write the test page default.aspx, and put it in the "F:/demo" directory
Input test page: http://localhost:8080/aspnet/default.aspx
Publish an ASP Web site with Apache