• 将.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
    至于哪个配置我就不再讲了看一下手册
  • 相关阅读:
    一些javascript的常用方法(转载)
    php在线处理视频 (在线视频转码,取得视频信息)
    在JS中最常看到切最容易迷惑的语法(转)
    jquery ui resizable bug
    设计技巧
    超大记录量数据库设计
    相似度分析(转)
    linux vi 替换命令
    今天发现一个关于CSS的东东,解决了我很多疑问
    Http Handler 介绍
  • 原文地址:https://www.cnblogs.com/yi/p/516507.html
Copyright © 2020-2023  润新知