讓apache也支持asp環(huán)境的方法
注:注意上面方法只限于在windows下 并且裝了Framework一般win7已經(jīng)自帶有了
1、首先 下載一個(gè)mod_aspdotnet-2.2.0.2006-setup-r2.msi
2、安裝好后在apache的moudles目錄會(huì)生成一個(gè)mod_aspdotnet.so文件
3、修改httpd.conf 在文件的末尾加上下面代碼
#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>
AspNetMount / "D:/xampp/xampp/htdocs/"
Alias / "D:/xampp/xampp/htdocs/"
<Directory "D:/xampp/xampp/htdocs/">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex index.htm index.aspx
</Directory>
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
其中紅色為你網(wǎng)站放置的目錄
4、重新啟動(dòng)apache ok成功
看看其它文章
按照網(wǎng)上的說明嘗試裝IIS,好歹裝上了可是不好使,看來xp home是不支持IIS,于是轉(zhuǎn)向Apache。
下載安裝好Apache 2.2.9 http://www.apache.org/,一切正常,又發(fā)現(xiàn)不支持asp和.net的程序,暈;
google一番,找到Sun Java System Active Server Pages 4.0
http://www.sun.com/software/chilisoft/,
下載下來安裝好,重啟機(jī)器,ok,asp沒問題了;
繼續(xù)google,找到Apache下面的一個(gè)項(xiàng)目mod_aspdotnet,發(fā)現(xiàn)Apache已經(jīng)不支持此項(xiàng)目了,
此項(xiàng)目改投sourceforge,mod_aspdotnet-2.2.0 http://sourceforge.net/projects/mod-aspdotnet,
下載安裝,修改apache的httpd.conf,在最后添加
#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 example application
AspNetMount /active "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active"
# Map all requests for /active to the application files
Alias /active "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active"
# Allow asp.net scripts to be executed in the active example
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/active">
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all DirectoryIndex Default.htm Default.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>
以上部分代碼,注意不要有空行,相關(guān)路徑按照實(shí)際情況填寫
又又發(fā)現(xiàn)此版本只支持.net framework1.1,于是卸掉2.0重裝1.1,ok了,只是對(duì).net 2.0的語法不支持
。
最終測(cè)試成功的環(huán)境
windows xp home edition
apache 2.2.9
sun one asp 4.0
.net frmawork 1.1
mod_aspdotnet 2.2.0
萬惡的microsoft
KO我們的安裝就可以了,大家看看可以正常運(yùn)行不哦。
相關(guān)文章
centos8使用Apache httpd2.4.37安裝web服務(wù)器的步驟詳解
這篇文章主要介紹了centos8使用Apache httpd2.4.37安裝web服務(wù)器的步驟詳解,本文分步驟給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-08-08
Ubuntu 14.04下Django和MySQL環(huán)境部署全過程
這篇文章主要介紹了Ubuntu 14.04下Django和MySQL環(huán)境部署全過程,文中通過一步步的安裝步驟介紹的很詳細(xì),相信對(duì)大家具有一定的參考借鑒價(jià)值,有需要的朋友們下面來一起來看看吧。2017-02-02
linux 配置本地yum源,配置國內(nèi)yum源,配置epel源的步驟
這篇文章主要介紹了linux 配置本地yum源,配置國內(nèi)yum源,配置epel源的步驟,幫助大家更好的配置服務(wù)器,感興趣的朋友可以了解下2020-12-12
Linux命令學(xué)習(xí)總結(jié):詳解reboot命令
這篇文章主要介紹了Linux命令學(xué)習(xí)總結(jié):詳解reboot命令,這個(gè)指令使用起來非常簡單,有興趣的可以了解一下。2016-11-11

