用 Apache 发布 ASP.NET 网站
来源:互联网 发布:安卓client软件 编辑:程序博客网 时间:2024/06/02 01:02
由于服务器需要发布 JSP 、PHP、ASP.NET 几种网站进行测试,Apache 肯定是支持 JSP 和 PHP 。鉴于 Apache 的开放精神 ,ASP.NET 应该也是支持的,于是乎 Google之。配置步骤如下:
1.下载 ASP.NET 解析模块(mod_aspdotnet )
下载地址:http://sourceforge.net/projects/mod-aspdotnet/ ,直接安装。在...\apache\modules目录下会出现一个名为 mod_aspdotnet.so 的模块。
2.配置 Apache 使其支持此模块
创建配置文件 mod_aspdotnet.conf, 保存在 ...\apache\conf 目录下,其内容如下:
# ASP.NET SupportLoadModule aspdotnet_module modules/mod_aspdotnet.soAddHandler 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 /aspnet "f:/demo" # Map all requests for /active to the application files Alias /aspnet "f:/demo" # Allow asp.net scripts to be executed in the active example <Directory "f:/demo"> Options FollowSymlinks ExecCGI Order allow,deny Allow from all DirectoryIndex index.aspx Default.aspx index.html </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>
注意:下面两句不能换行,且网站本地路径中不能包含中文字符。
AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo
AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) \"C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4"
然后再 httpd.conf 文件末尾添加
#mod_aspdotnet supportInclude conf/mod_aspdotnet.conf
最后重启 Apache 即可。
3. 测试
编写测试页default.aspx,放在“f:/demo” 目录下
输入测试页:http://localhost:8080/aspnet/default.aspx
- 用 Apache 发布 ASP.NET 网站
- Asp.net网站发布
- asp.net发布网站
- Asp.net发布网站
- asp.net 发布网站
- ASP.NET发布网站
- ASP.NET网站发布
- asp.net 网站发布
- ASP.NET网站发布
- 发布asp.net网站
- asp.net 网站发布
- 关于用apache发布asp.net网站的详细配置步骤
- 用VS2010发布ASP.net网站
- asp.net 发布网站 需知
- ASP.NET网站发布问题
- asp.net网站发布心得
- ASP.NET发布网站解决方案
- asp.net网站发布详解
- Xqk.Data数据框架使用说明之:如何自定义数据表名
- 如何创建.htaccess文件
- pb調用 ole處理
- 失败者没有发言权
- 购物车的实现
- 用 Apache 发布 ASP.NET 网站
- VC中radiobutton控件的用法
- hwclock: settimeofday() failed: Invalid argument
- 人生的过程何尝不是在等车和转乘
- 多进程与多线程(六)
- iOS 检查网络状态是否可用
- Asp.net 后台添加CSS、JS、Meta标签
- Android 字体大小怎么自适应不同分辨率?
- 冒泡排序