使Apache支持asp和.net

手头有几个站点程序,想搭起来看一下,于是安装IIS,可系统偏偏是xp home,

按照网上的说明尝试装IIS,好歹装上了可是不好使,看来xp home是不支持IIS,于是转向Apache。

下载安装好Apache 2.2.9 http://www.apache.org/,一切正常,又发现不支持asp和.net的程序,晕;

google一番,找到Sun Java System Active Server Pages 4.0 http://www.sun.com/software/chilisoft/

下载下来安装好,重启机器,ok,asp没问题了;

继续google,找到Apache下面的一个项目mod_aspdotnet,发现Apache已经不支持此项目了,

此项目改投sourceforge,mod_aspdotnet-2.2.0 http://sourceforge.net/projects/mod-aspdotnet

下载安装,修改apache的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

<IfModule mod_aspdotnet.cpp>

# Mount the ASP.NET example application

AspNetMount /active "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active"

# Map all requests for /active to the application files

Alias /active "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active"

# Allow asp.net scripts to be executed in the active example

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active">

Options FollowSymlinks ExecCGI

Order allow,deny

Allow from all DirectoryIndex Default.htm Default.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>

</IfModule>

以上部分代码,注意不要有空行,相关路径按照实际情况填写

又又发现此版本只支持.net framework1.1,于是卸掉2.0重装1.1,ok了,只是对.net 2.0的语法不支持。

最终测试成功的环境

windows xp home edition

apache 2.2.9

sun one asp 4.0

.net frmawork 1.1

mod_aspdotnet 2.2.0

万恶的microsoft

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值