title: Fail to start a mono site with Apache2, 404 error with mod_mono
body: <p>My home system is an Ubuntu 13.4 (upgraded from 12.10) desktop system, where I do some development, mainly in PHP, and I have Apache installed and working fine.</p>
  
  <p>I need to do some development in ASP.NET and I installed MonoDevelop, as well as an XSP server.  From MonoDevelop I can launch XSP, which serves at port 8080 (localhost:8080).  This is okay during a development session, but for some reason XSP seem to be timed out, and my router doesn't serve port 8080; aditionally, XSP only serves one mono project at a time.</p>
  
  <p>I have attempted to configure a virtual host with Apache, but it is not working.  I get 404 errors both for static files, aspx files and nonexistent files.</p>
  
  <p>My vhost configruation is as following:</p>
  
  <pre><code>&lt;virtualhost *:80&gt;
      ServerAdmin webmaster@mydomain.net
      ServerName  myproject.local
      ServerAlias myproject.mydomain.net
  
      DocumentRoot    /home/myuser/source/myproject/myproject
      &lt;Directory /home/myuser/source/myproject/myproject&gt;
          Options Indexes FollowSymLinks MultiViews
          AllowOverride None
          Order allow,deny
          Allow from all
          SetHandler  mono
          DirectoryIndex  Default.aspx index.aspx index.html
      &lt;/Directory&gt;
  
      LogLevel    debug
      ErrorLog    /var/www/vhosts/myproject/log/error.log
      CustomLog   /var/www/vhosts/myproject/log/access.log combined
  &lt;/virtualhost&gt;
  </code></pre>
  
  <p>Looking at the error log, I find the following messages:</p>
  
  <pre><code>[Mon Oct 07 00:42:45 2013] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 279 to 214 : URL /
  [Mon Oct 07 00:43:00 2013] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 291 to 223 : URL /Default.aspx
  [Mon Oct 07 00:43:04 2013] [error] [client 127.0.0.1] script '/home/myuser/source/myproject/myproject/Default.php' not found or unable to stat
  [Mon Oct 07 00:43:04 2013] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 290 to 222 : URL /Default.php
  [Mon Oct 07 00:43:14 2013] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 292 to 222 : URL /Template.css
  [Wed Oct 09 12:36:00 2013] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 290 to 221 : URL /favicon.ico
  </code></pre>
  
  <p>The files <code>Default.php</code> and <code>favicon.ico</code> do not exist, the other files <code>Default.aspx</code> and <code>Template.css</code> do exist.</p>
  
  <p>Thank you in advance.</p>
  
  <hr>
  
  <h2>Update</h2>
  
  <p>I missed a part of the configuration: the <code>webapp</code> file.  I added to <code>/etc/mono-server4/debiab.webapp</code> to add the project.</p>
  
  <pre><code>&lt;apps&gt;
  &lt;web-application&gt;
      &lt;name&gt;myproject&lt;/name&gt;
      &lt;vhost&gt;myproject&lt;/vhost&gt;
      &lt;vport&gt;80&lt;/vport&gt;
      &lt;vpath&gt;/&lt;/vpath&gt;
      &lt;path&gt;/home/myuser/source/myproject/myproject/&lt;/path&gt;
      &lt;enabled&gt;true&lt;/enabled&gt;
  &lt;/web-application&gt;
  &lt;/apps&gt;
  </code></pre>
  
  <p>Now it works!</p>
  
  <hr>
  
  <p><em>Now, I cannot make it work for virtual directories for different apps.</em></p>