[Mono-aspnet-list] MVC4 and mod_mono

Daniel Lo Nigro lists at dan.cx
Sat Feb 16 02:04:08 UTC 2013


I don't use mod_mono (I use Nginx + Mono FastCGI) but I think your
configuration is missing the settings for the applications (the
MonoApplications setting, or auto configuration settings). Without this,
Mono doesn't know where your ASP.NET application is.

See http://www.mono-project.com/Mod_mono and
http://www.mono-project.com/AutoHosting


On Sat, Feb 16, 2013 at 12:43 PM, Gil Dolosa <vdolosa at gmail.com> wrote:

> Here is the mod_mono:
> <IfModule !mod_mono.c>
>     LoadModule mono_module /usr/lib/apache2/modules/mod_mono.so
> </IfModule>
>
> <IfModule mod_mono.c>
>     MonoServerPath /usr/bin/mod-mono-server4
> </IfModule>
>
> <IfModule mod_headers.c>
>     Header set X-Powered-By "Mono"
> </IfModule>
>
> 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
> AddType application/x-asp-net .cshtml
>
> DirectoryIndex Default.cshtml
> DirectoryIndex index.aspx
> DirectoryIndex Default.aspx
> DirectoryIndex default.aspx
>
> I just manually added all of the ".cshtml" details here. Don't know what
> should I add on this section.
>
> On the sites-enabled directory, there are no mono-specific configuration
> installed, aside from the mod-mono-server control panel:
>     <Location /mono>
>       SetHandler mono-ctrl
>       Order deny,allow
>       allow from all
>     </Location>
>
> Whenever I try to add 'SetHandler mono' on the default site, it stops to
> handle any ASP.NET apps I try to deploy there.
>
> Anyway, I forgot to mention that I compiled mono, xsp4, and
> mod_mono(3.0.4) from source(git)
>
>
> On Sat, Feb 16, 2013 at 9:10 AM, Daniel Lo Nigro <lists at dan.cx> wrote:
>
>> What's your mod_mono configuration look like?
>>
>>
>> On Sat, Feb 16, 2013 at 2:30 AM, eSPiYa <vdolosa at gmail.com> wrote:
>>
>>> Just started trying to learn ASP.NET MVC4 and trying to deploy it on my
>>> Ubuntu 12.04 server.
>>>
>>> I can build and deploy basic ASP.NET web-apps, even tried using Razor
>>> 2.0 on
>>> my server. But whenever I try to deploy my MVC4 app, it will just show
>>> the
>>> root directory of this web app and can't load my HomeController.
>>> Developed
>>> using MSVS2012, and written from scratch. I always exclude
>>> 'Microsoft.Web.Infrastructure' from the deployment because of Mono has
>>> its
>>> own implementation of this library.
>>>
>>> I even tried to run it on the same server using XSP4 and it works, it
>>> just
>>> fails on mod_mono. I even tried to restart the whole apache2 server,
>>> mono-xsp4, and mod-mono-server4(through the control panel), but it does
>>> nothing. Tried to look at the error logs of apache2 but there are no
>>> error
>>> message there aside from the 'No application found for /Home', which is
>>> generated whenever I tried to access the default
>>> page(http://myserver.com/Home).
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://mono.1490590.n4.nabble.com/MVC4-and-mod-mono-tp4658598.html
>>> Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Mono-aspnet-list mailing list
>>> Mono-aspnet-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20130216/92180dd9/attachment.html>


More information about the Mono-aspnet-list mailing list