zoukankan      html  css  js  c++  java
  • 将.net布署在运行Apache服务器上

    (本文引用外国外站,链接:http://weblogs.asp.net/israelio/archive/2005/09/11/424852.aspx)
    不要问我为什么一定要这么做,因为我们有时候的需求是这样,没办法解释

    首先安装Apache:可以安装任何版本,但最好是2.0以上
    然后再安装Mod AspDoNet(链接:http://archive.apache.org/dist/httpd/mod_aspdotnet/但是目前好象不再做支持,好可惜)

    添加以下自信到Apache Group\Apache2\conf\httpd.conf the following lines:

    #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 /asp application
      AspNetMount /SampleASP "c:/SampleASP"
      #/SampleASP is the alias name for asp.net to execute
      #"c:/SampleASP" is the actual execution of files/folders  in that location

      # Map all requests for /asp to the application files
      Alias /SampleASP "c:/SampleASP"
      #maps /SampleASP request to "c:/SampleASP"
      #now to get to the /SampleASP type
    http://localhost/SampleASP
      #It'll redirect
    http://localhost/SampleASP to "c:/SampleASP"

      # Allow asp.net scripts to be executed in the /SampleASP example
      <Directory "c:/SampleASP">
        Options FollowSymlinks ExecCGI
        Order allow,deny
        Allow from all
        DirectoryIndex index.htm index.aspx
       #default the index page to .htm and .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>
    #asp.net


    创建一个目录:C:\SampleAsp然后加入个index.aspx
    重新启动你的apache服务器,这样就可以访问了,访问地址是:http://localhost/SampleASP/index.aspx
    至于哪个配置我就不再讲了看一下手册
  • 相关阅读:
    第一章、web应用安全概论--web应用系统介绍--TCP/IP协议
    IIS配置导入导出
    shell习题第10题:打印每个单词的字数
    腾讯云的对象存储COS
    shell习题第9题:sed的常用用法
    shell习题第8题:监控nginx的502状态
    shell习题第7题:备份数据库
    shell习题第6题:监听80端口
    Python的math模块
    Python模块
  • 原文地址:https://www.cnblogs.com/yi/p/516507.html
Copyright © 2011-2022 走看看