Apache中配置ASP.NET環境

來源:互聯網
上載者:User

前提已經搭配好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> 

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.