试图让 Microsoft MVC2 网站在使用 mod_aspdotnet 模块的 Apache 2.2 Web 服务器(在 Windows 上运行)上运行。运行多个 ASP.NET 虚拟主机,尝试添加另一个。MVC2没有默认页面(就像 MVC 的第一个版本有例如 default.aspx)。我尝试了对配置的各种更改:注释掉“DirectoryIndex”,将其更改为“/”。将“ASPNET”设置为“虚拟”,不会加载第一页,总是得到:“403 Forbidden,您无权访问此服务器上的 /。”
以下来自我的 http.conf:
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 aspdotnet_module>
# Mount the ASP.NET /asp application
#AspNetMount /MyWebSiteName "D:/ApacheNET/MyWebSiteName.com"
Alias /MyWebSiteName" D:/ApacheNET/MyWebSiteName.com"
<VirtualHost *:80>
DocumentRoot "D:/ApacheNET/MyWebSiteName.com"
ServerName www.MyWebSiteName.com
ServerAlias MyWebSiteName.com
AspNetMount / "D:/ApacheNET/MyWebSiteName.com"
# Other directives here
<Directory "D:/ApacheNET/MyWebSiteName.com">
Options FollowSymlinks ExecCGI
AspNet All
#AspNet Virtual Files Directory
Order allow,deny
Allow from all
DirectoryIndex default.aspx index.aspx index.html
#default the index page to .htm and .aspx
</Directory>
</VirtualHost>
# 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>
有没有人使用 mod_aspdotnet 模块在 Apache 上成功运行 Microsoft 的 MVC2(或 MVC 的第一个版本)?谢谢 !