因为我使用APACHE,因为我需要使用.NET,因为我大部分时间在做JAVA,使用TOMCAT
所以,我要让APACHE支持.NET,这样可以避免只是在IIS和APACHE之间切换(用8080)是很痛苦的。
先到APACHE的官方网站上看看有没有类似的模板,运气还真不错.确实有。DOWNLOAD
安装。发现在APACHE的安装目录的MODEL中多了一个文件。估计是支持.NET的。
下面开始配置HTTP.CONF
#---------------添加对ASPDOTNET的支持-------------------
LoadModule aspdotnet_module modules/mod_aspdotnet.so
#-------------------------------------------------------
#载入模块
#处理类型
AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo
# Mount the ASP.NET example application
//虚拟目录安放位置,不可少
AspNetMount /asp "G:/asp"
# Map all requests for /active to the application files
//同上
Alias /asp "G:/asp"
# Allow asp.net scripts to be executed in the active example
//配置目录权限
<Directory "G:/asp">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex Default.htm Default.aspx index.asp index.html index.aspx
</Directory>
//配置虚拟机所在目录
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>
OK,一帆风顺......可以用了,感谢APACHE.....