apache服务器配置Net的实践

前置:

在xp系统中,打补丁之类或啥子操作引起或多或少的问题,最终导致iis不能使用;

 

不想装系统...忍着...

 

最近突发事件导致,需要摸一下apache服务器处理,好吧,那就搜索下吧.....

 


目标:

1、apache需要支持Net

 


第一步:安装apache服务器

参考地址:http://jingyan.baidu.com/article/d8072ac47baf0eec95cefdca.html

 

实践过程:

1、win7 64

2、Apache 2.4.23 服务器软件

3、兼容VS2008开发工具,采用V9;可以支持xp,server 2003【当前未实践xp】

 

安装过程,在参考文档中很详细,这里再重复一个卸载:

建议先停止服务再删除

cmd-》输入命令:sc delete [apache服务器名称]

 


 

第二步:如何配置Net

Apache组织早在2007年就开发出mod_aspdotnet,如下地址:

https://sourceforge.net/projects/mod-aspdotnet/?source=typ_redirect

 

下载后,直接安装,在安装过程中,第一步,很慢,他需要检测你的apache目录;

具体过程如下:
1.安装mod_aspdotnet,安装过程中会先检测Apache的安装目录,确认正确后一路“next”;
2.进入Apache的modules目录,你会发现增加了mod_aspdotnet.so;
3.进入Apache的conf目录,打开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
# Mount the ASP.NET example application假设网站文件位于d:/web/dotnet_document
AspNetMount /mytest "d:/web/dotnet_document"
# Map all requests for /active to the application files
Alias /mytest "d:/web/dotnet_document"
# Allow asp.net scripts to be executed in the active example
<Directory "d:/web/netSample">
    Options FollowSymlinks ExecCGI
    Order allow,deny
    Allow from all
    DirectoryIndex Default.htm Default.aspx index.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>
##################################################################

 


 

基本上就配置完毕,需要检测下成果;

1、apache是成功了,能访问localhost;

2、新增 mod_aspdotnet后,失败,重复做了几次都类似错误;【其中出现一些错误,需要重启才能停止,比如端口占用问题】

预估估计是apache版本问题,重新下载2.2版本的apache程序尝试,实践过程中,apache2.2只能放在根目录下的目录中,不知道啥子问题;

我把apache放在d:\webServer\apache22中,一直过不到,报错说d:\apache22目录下的啥子文件找不到;实际配置到d:\webServer\apache22;粗略感觉还是啥子地方没有弄明白;

好吧,我先将就到d:\apache22,重启后,apache正常了。

 

3、经过window的错误信息查看,知道是应该是配置文件的问题,不应该

csproj \ 

licx ...

 

应该 csproj licx ...

这个估计之前的2.4没有问题

 

4、经常出现433端口占用问题,经过分析:是被占用了

win下面输入命令,可以看到pid

netstat -o ,定位了pid,直接kill

 

5、现在

apache环境:Apache/2.2.31 (Win32) mod_aspdotnet/2.2 mod_ssl/2.2.31 OpenSSL/1.0.2j

 

好吧,能用了;但出现:“

当前标识(NT AUTHORITY\SYSTEM)没有对“C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files”的写访问权限。

 

悲剧,不知道这个咋个弄了,先放到起

posted @ 2016-12-13 10:25  西就东城  阅读(488)  评论(8编辑  收藏  举报