Apache httpd支持https://www.doczj.com/doc/bb15623604.html,
首先,必须要有Windows环境和.NET Framework的支持。此外还建议安装安装.NET开发工具如.NET Framework SDK或者https://www.doczj.com/doc/bb15623604.html,。需要注意的是Windows的版本应为2000、2003和XP。Win9X系列不能安装.NET Framework。
然后需要安装Apache。应该使用Win32平台的Apache,版本2.0以上。
推荐软件
Apache httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
mod_aspdotnet-2.2.0.2006-setup-r2.msi
安装路径请与Apache的路径一致,否则不能正常安装.
为了便于管理,我们在htdocs目录下新建一个web目录,专门存放.aspx文件。现在,为了让Apache支持https://www.doczj.com/doc/bb15623604.html,,需要对httpd.conf文件作一定配置,在文件末尾添加:
#https://www.doczj.com/doc/bb15623604.html,
LoadModule aspdotnet_module "modules/mod_aspdotnet.so"
AddHandler https://www.doczj.com/doc/bb15623604.html, asax ascx ashx asmx aspx axd config cs csproj \
licx rem resources resx soap vb vbproj vsdisco webinfo
# Mount the https://www.doczj.com/doc/bb15623604.html, example application
# C:/Apache2.2/htdocs 为Apache路径下的htdocs目录
AspNetMount /web "C:/Apache2.2/htdocs/web"
# Map all requests for /active to the application files
Alias /web "C:/Apache2.2/htdocs/web"
# Allow https://www.doczj.com/doc/bb15623604.html, scripts to be executed in the active example
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex Default.htm Default.aspx index.aspx index.htm index.html
# For all virtual https://www.doczj.com/doc/bb15623604.html, 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/https://www.doczj.com/doc/bb15623604.html,/Framework/v$1.$2.$3/https://www.doczj.com/doc/bb15623604.html,ClientFiles/$4"
Options FollowSymlinks
Order allow,deny
Allow from all