Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It is definitely not the optimal solution, but commenting the first and last lines seems to solve the problem. I do get a warning on double-loading, but now I know that with those lines the file isn't even read.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.