zoukankan      html  css  js  c++  java
  • Apache中配置ASP.NET环境

    前提已经搭配好Apache环境

    下载安装      2mod_aspdotnet-2.0.0.msi(到这里下载http://httpd.apache.org/modules/ 

    需要配置httpd.conf 文件 在文件末尾 加下面代码

    # asp.net 支持
    #
     这2条配置属于全局配置,可放在其它响应 LoadModule/AddHandler 语句块后面
    #
     我的配置中,下面整个配置块是放在最后,未分开,这也是为了方便管理
    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 语句相当于 Linux 中的 mount 命令,是把Asp程序目录挂载到一个 URL 地址
    #
     如果不是整个网站都用Asp,则不应该挂在‘/’下。如:AspNetMount /asptool "D:\\www\\Apache2\\htdocs\\aspweb"
    #
     注意:整站采用时,全局的DocumentRoot 为 "D:/www/Apache2/htdocs/aspweb"
    AspNetMount / "D:/PHPnow/htdocs"

    # Map all requests for /active to the application files
    #
     意思是把所有到‘/asptool’的请求映射到挂载的Asp程序目录下
    #
     我的配置中,下面一句是注释掉的
    #
     Alias /asptool "D:/www/Apache2/htdocs/aspweb"

    # Allow asp.net scripts to be executed in the active example
    <Directory "D:/PHPnow/htdocs">
         Options FollowSymlinks ExecCGI
         Order allow,deny
         Allow 
    from all
         DirectoryIndex default.htm default.aspx index.html index.aspx
    </Directory>
    # For all virtual ASP.NET webs, we need the aspnet_client files
    #
     to serve the client-side helper scripts.

    # 注意:下面两行需要对应.Net Framework安装的目录
    AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*"C:/WIN2003/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> 
  • 相关阅读:
    第三周学习笔记
    质量属性
    第四周学习
    逻辑回归
    架构的概念
    第二周总结
    线性回归
    十步走-阅读笔记六
    十步走-阅读笔记五
    P2633 Count on a tree
  • 原文地址:https://www.cnblogs.com/zhangqifeng/p/2446995.html
Copyright © 2011-2022 走看看