详细内容
Apache运行.net网站的方法
发布日期:2010-06-22     点击:2651     字体:[ ]

1。运行.net网站,系统首先需安装.Net Framework,然后安装Apache(如果已安装IIS,需先更改网站端口,因为默认为80,可改为81,这样Apache安装就可以使用80端口,否则可能安装不成功),运行.net还需安装插件mod_aspdotnet,但该插件据说已停止更新,下面给出这两个软件的下载地址:

apache的下载地址: http://httpd.apache.org/download.cgi

mod_aspdotnet的下载地址:http://sourceforge.net/projects/mod-aspdotnet/

如果mod_aspdotnet插件安装过程中出现安装路径不正确,请参考:http://www.zdbase.com/content/detail.aspx?OID=FF9786F3-6FBA-478A-871D-E3DEDD161D21

2。修改apache的配置文件。

进入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假设网站文件位于E:/test_file
AspNetMount /youtest "E:/test_file"
# Map all requests for /active to the application files
Alias /youtest "E:/test_file"

# Allow asp.net scripts to be executed in the active example
<Directory "E:/test_file">
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>

3。在地址栏输入:http://localhost/youtest ,就可以访问你的.net网站了

本站Apache+mod_aspdotnet下载:Apache+mod_aspdotnet

用户评论
昵称 
内容  *
验证码   
   
相关文章 更多...  
Copyright © 2010 zdbase.com All Rights Reserved. 苏ICP备15039389号 可人软件设计