Apache添加mod_aspdotnet.so支持ASP.NET配置指南
2010-11-14 08:06:51 来源:WEB开发网
虽然IIS完美支持ASP.NET,自己常用Apache的缘故,要是让Apache也支持ASP.NET就好了,搜索一番,才知道,Apache组织早在2007年就开发出mod_aspdotnet了,不过随后就放弃更新了。。。
今天我们就来让Apache支持ASP.NET,
准备工作:
1.下载apache_2.0.55-win32-x86-no_ssl.msi(http://archive.apache.org/dist/httpd/binaries/win32/apache_2.0.55-win32-x86-no_ssl.msi);
2.下载mod_aspdotnet-2.0.0.msi(http://archive.apache.org/dist/httpd/mod_aspdotnet/mod_aspdotnet-2.0.0.msi),你也可到http://sourceforge.net/projects/mod-aspdotnet/去看看;
3.dotNetFramework v1.1或者v2.0(http://download.microsoft.com/download/7/b/9/7b90644d-1af0-42b9-b76d-a2770319a568/dotnetfx.exe);
安装配置:
1.首先安装dotNetFramework,这部很重要,因为我以前安装过略去;
2.安装Apache服务器,位置随你稍微配置一下,一路“next”;
3.安装mod_aspdotnet,安装过程中会先检测Apache的安装目录,确认正确后一路“next”;
4.进入Apache的modules目录,你会发现增加了mod_aspdotnet.so;
5.进入Apache的conf目录,打开httpd.conf配置文件,在尾部增加如下代码:
##################################################################
#ASP.NET
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假设网站文件位于f:/dotnet_document
AspNetMount /mytest "f:/dotnet_document"
# Map all requests for /active to the application files
Alias /mytest "f:/dotnet_document"
# Allow asp.net scripts to be executed in the active example
<Directory "f:/dotnet_document">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex Default.htm Default.aspx index.aspx
</Directory>
# For all virtual ASP.NET 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>
##################################################################
6.编写测试文件index.aspx存放到f:\dotnet_document目录下,内容如下:
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
Tags:Apache mod_aspdotnet.so ASP.NET配置
编辑录入:爽爽 [复制链接] [打 印]- ››apache设置域名绑定 以及绑定不起作用的排查
- ››apache rewrite将指定URL转向指定的几个服务器
- ››apache配置文件httpd.comf部分参数说明
- ››Apache+Mysql+PHP+phpMyAdmin+Mac OS X 10.7 Lion...
- ››apache+tomcat负载均衡_项目实例
- ››apache mysql php 源码编译使用
- ››Apache添加mod_aspdotnet.so支持ASP.NET配置指南
- ››Apache中改变php.ini的路径
- ››Apache2.2与Tomcat6整合及虚拟主机配置
- ››Apache+php+mysql在windows下的安装与配置图解
- ››Apache+Subversion完美结合,CentOS下实现版本控制...
- ››Apache HTTPServer2.2.16 发布
更多精彩
赞助商链接