apache for asp.net
下载httpd-win32-src.zip http://9.duote.org/httpd-win32-src.zip
安装路径 D:\Program Files\Apache Software Foundation\Apache2.2
完毕后。
修改配置文件的 Apache2.2\conf\httppd.conf 端口号
Listen 80 -> Listen 8080
输入 http://127.0.0.1:8080/index.html
出现 itworks
访问的文件是 Apache2.2\htdocs\index.html
DocumentRoot "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
# Deny from all
allow from all
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
如果要更改文件存放的位置 修改上面2句红色的部分
然后下载 mod_aspdotnet-2.2.0.2006-setup-r2.rar( asp.net for apche的model )
下载地址 http://dldx.csdn.net/fd.php?i=48459164096940&s=ebe840c65e431c9d7342a864c4118c7a
安装路径 D:/Program Files/Apache Software Foundation/Apache2.2
在文件最后面添加上下面一段就可以访问ASP.NET的页面
#Asp.net -- fanruyi 20111020
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 /wwwroot "c:/wwwroot"
# Map all requests for /active to the application files
Alias /wwwroot "c:/wwwroot"
# Allow asp.net scripts to be executed in the active example
<Directory "c:/wwwroot">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex 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>
</IfModule>
aspx页面存放路径 C:\wwwroot\index.aspx
浏览器访问 http://127.0.0.1:8080/wwwroot/index.aspx
显示结果 2011-10-20 12:50:15
index.aspx 内容
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
<%Response.Write(DateTime.Now.ToString());%>
modules/mod_aspdotnet.so 在 D:\Program Files\Apache Software Foundation\Apache2.2\modules
2011-10-20