Apache run aps.net 出现的问题
来源:程序员人生 发布时间:2014-03-15 16:45:40 阅读次数:2348次
问题1: size=18px]如果对httpd.conf文件添加aps.net的配置,重启后就会失败,只有把这段配置重新删除后才能启动[/size]。
下面是我的配置:
#--------------------------------------------------------------------------
#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 Group/Apache2/htdocs/active"
# Map all requests for /active to the application files
Alias /active "C:/Program Files/Apache Group/Apache2/htdocs/active"
# Allow asp.net scripts to be executed in the active example
<Directory "C:/Program Files/Apache Group/Apache2/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">
"C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">
Options FollowSymlinks
Order allow,deny
Allow from all
</Directory>
</IfModule>
#--------------------------------------------------------------------------
问题2:如果我把apache关闭后,重启就会出现这样的错误:
C:Program FilesApache GroupApache2in>apache -k start
Syntax error on line 960 of C:/Program Files/Apache Group/Apache2/conf/httpd.con
f:
Invalid command 'xa1xa1xa1xa1LoadModule', perhaps mis-spelled or defined by
a module not included in the server configuration
---
问题3:在active下放.aspx文件,就会现实源码。
我想应该是我的配置文件没有写好,所以才会现实源码,但是我不知道我的配置文件错在哪里。
以下为最佳答案: 根据你的出错情况应该是你从该网站直接复制配置文件代码时,LoadModule命令之前插入了两个全角空格导致Apache识别命令失败。因此,请顶格输入你的配置代码。 形如这样: #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 而不是 #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 多了一行 "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles"> |
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠