|
 |
栏目导栏 |
|
| |
|
|
|
|
 |
资料搜索 |
|
| |
|
|
|
|
 |
热门文章 |
|
| |
|
|
|
|
 |
最新文章 |
|
| |
|
|
|
| |
| |
|
|
|
|
Apache是目前广泛使用的一种网络服务器程序,不仅在UNIX/Linux平台上被大量使用,而且在Windows平台上也有许多站点放弃了IIS而转向Apache。.NET是微软推出的功能强大的开发技术,其目标就是与Java抗衡。ASP.NET非常适合于中小企业的Web应用,其性能较ASP3.0有了极大的提高。下面就介绍让Apache支持ASP.NET的办法。 6BSLinux联盟 6BSLinux联盟 首先,必须要有Windows环境和.NET Framework的支持。此外还建议安装.NET开发工具如.NET Framework SDK或者VisualStudio.NET。需要注意的是Windows的版本应为2000、2003和XP。Win9X系列不能安装.NET Framework。然后需要安装Apache。应该使用Win32平台的Apache,版本2.0以上。推荐使用2.0.51版本。 6BSLinux联盟 6BSLinux联盟 下面要下载并安装Apache环境下的ASP.NET模块。下载地址:http://www.apache.org/dist/httpd/mod_aspdotnet/mod_aspdotnet-2.0.0.msi下载完成后双击打开,一路Next即可安装完成。 6BSLinux联盟 6BSLinux联盟 为了便于管理,我们在htdocs目录下新建一个active目录,专门存放.aspx文件。现在需要对httpd.conf文件作一定配置,在文件末尾添加: 6BSLinux联盟 6BSLinux联盟 #asp.net 6BSLinux联盟 6BSLinux联盟 LoadModule aspdotnet_module "modules/mod_aspdotnet.so" 6BSLinux联盟 6BSLinux联盟 AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj \ 6BSLinux联盟 6BSLinux联盟 licx rem resources resx soap vb vbproj vsdisco webinfo 6BSLinux联盟 6BSLinux联盟 <IfModule mod_aspdotnet.cpp> 6BSLinux联盟 6BSLinux联盟 # Mount the ASP.NET example application 6BSLinux联盟 6BSLinux联盟 AspNetMount /active "D:/Program Files/Apache Group/Apache2/htdocs/active" 6BSLinux联盟 6BSLinux联盟 # Map all requests for /active to the application files 6BSLinux联盟 6BSLinux联盟 Alias /active "D:/Program Files/Apache Group/Apache2/htdocs/active" 6BSLinux联盟 6BSLinux联盟 # Allow asp.net scripts to be executed in the active example 6BSLinux联盟 6BSLinux联盟 <Directory "D:/Program Files/Apache Group/Apache2/htdocs/active"> 6BSLinux联盟 6BSLinux联盟 6BSLinux联盟 Options FollowSymlinks ExecCGI 6BSLinux联盟 6BSLinux联盟 Order allow,deny 6BSLinux联盟 6BSLinux联盟 Allow from all 6BSLinux联盟 6BSLinux联盟 DirectoryIndex Default.htm Default.aspx 6BSLinux联盟 6BSLinux联盟 </Directory> 6BSLinux联盟 6BSLinux联盟 # For all virtual ASP.NET webs, we need the aspnet_client files 6BSLinux联盟 6BSLinux联盟 # to serve the client-side helper scripts. 6BSLinux联盟 6BSLinux联盟 AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) \ 6BSLinux联盟 6BSLinux联盟 "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4" 6BSLinux联盟 6BSLinux联盟 <Directory "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles"> 6BSLinux联盟 6BSLinux联盟 "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles"> 6BSLinux联盟 6BSLinux联盟 Options FollowSymlinks 6BSLinux联盟 6BSLinux联盟 Order allow,deny 6BSLinux联盟 6BSLinux联盟 Allow from all 6BSLinux联盟 6BSLinux联盟 </Directory> 6BSLinux联盟 6BSLinux联盟 </IfModule> 6BSLinux联盟 6BSLinux联盟 其中D:/Program Files/Apache Group/Apache2是Apache的安装目录,应根据实际情况更改。现在可以在active目录下放上ASP.NET探针。重启Apache之后,即可体验Apache下的ASP.NET了。 6BSLinux联盟 6BSLinux联盟 由于IIS和Apache下的ASP.NET都是运行在Common Language Runtime(CRL)的基础上,因此Apache环境下的ASP.NET程序的运行速度不会比在IIS下慢。 6BSLinux联盟
Linux联盟收集整理 ,转贴请标明原始链接,如有任何疑问欢迎来本站Linux论坛讨论 |
|
|
|
|
|