2

Mod_mono 没有提供页面,如果我转到 url 它只是下载页面而不是提供它。这是我的虚拟主机文件。其他一切都是默认设置,我所做的就是启用 mod_mono 并重新启动服务器

我在 Ubuntu 12.04 x64 上运行 virtualmin

<VirtualHost xxx.xxx.xxx.xxx:80>
  ServerName mysite.com
  ServerAlias www.mysite.com


ServerAdmin dev@mysite.com
  DocumentRoot /home/mysite/public_html
  # MonoServerPath can be changed to specify which version of ASP.NET is hosted
  # mod-mono-server1 = ASP.NET 1.1 / mod-mono-server2 = ASP.NET 2.0
  # For SUSE Linux Enterprise Mono Extension, uncomment the line below:
  # MonoServerPath mysite.com "/opt/novell/mono/bin/mod-mono-server2"
  # For Mono on openSUSE, uncomment the line below instead:
  MonoServerPath mysite.com "/usr/bin/mod-mono-server4"

  # To obtain line numbers in stack traces you need to do two things: 
  # 1) Enable Debug code generation in your page by using the Debug="true" 
  #    page directive, or by setting <compilation debug="true" /> in the 
  #    application's Web.config
  # 2) Uncomment the MonoDebug true directive below to enable mod_mono debugging
  MonoDebug mysite.com true

  # The MONO_IOMAP environment variable can be configured to provide platform abstraction
  # for file access in Linux.  Valid values for MONO_IOMAP are:
  #    case
  #    drive
  #    all
  # Uncomment the line below to alter file access behavior for the configured application
  MonoSetEnv mysite.com MONO_IOMAP=all
  #
  # Additional environtment variables can be set for this server instance using 
  # the MonoSetEnv directive.  MonoSetEnv takes a string of 'name=value' pairs 
  # separated by semicolons.  For instance, to enable platform abstraction *and* 
  # use Mono's old regular expression interpreter (which is slower, but has a
  # shorter setup time), uncomment the line below instead:
  # MonoSetEnv mysite.com MONO_IOMAP=all;MONO_OLD_RX=1

  MonoApplications mysite.com "/:/home/mysite/public_html"
  <Location "/">
    MonoSetServerAlias mysite.com
    SetHandler mono
    AddHandler mod_mono .aspx .ascx .asax .ashx .config .cs .asmx
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all 
    SetHandler mono
    DirectoryIndex default.aspx
  </Location>
  <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
  </IfModule>
</VirtualHost>

我错过的任何东西

4

0 回答 0