I have tried to set up an Ubuntu server running Apache/mod_mono in a VirtualBox VM, and have encountered a problem when trying to configure Apache to use mod_mono to serve the ASP.NET application.
I got a dummy ASP.NET application in /var/www/aspx1 (a simple Default.aspx and a minimalistic Web.config). Here is my httpd.conf file:
ServerName localhost
Include mod_mono.conf
And my mod_mono.conf:
<IfModule !mod_mono.c>
LoadModule mono_module modules/mod_mono.so
MonoAutoApplication enabled
AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .vb
AddType application/x-asp-net .master
AddType application/x-asp-net .sitemap
AddType application/x-asp-net .resources
AddType application/x-asp-net .skin
AddType application/x-asp-net .browser
AddType application/x-asp-net .webinfo
AddType application/x-asp-net .resx
AddType application/x-asp-net .licx
AddType application/x-asp-net .csproj
AddType application/x-asp-net .vbproj
AddType application/x-asp-net .config
AddType application/x-asp-net .Config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx
</IfModule>
I have also tried to disable MonoAutoApplication and add the following lines:
AddMonoApplications default "/:/var/www"
<Location "/">
SetHandler mono
</Location>
Going to http://int.er.nal.ip/aspx1/ simply lists the folder contents (Apache standard listing) and going to http://int.er.nal.ip/aspx1/Default.aspx offers to save the file.
After every change I have restarted Apache, and also rebooted the VM just in case.
Thanks!
