I am running a VPS with Centos 6.3, with WHM 11.34.1 (build 11). I wish to use mod_mono to host an ASP.NET 4 application.

(Background: I am rewriting a hobby PHP website in ASP.NET MVC 4, and want to host it on the same machine. I would like to avoid renting another machine because I run other things on this server than the website.)

First, I tried the most obvious step, and used easyapache to add mod_mono support. However, that was a bust because the latest version of mono that WHM supports is 2.6.7, which supports ASP.NET 2. ASP.NET 4 support was added later. Seeing that this was a dead-end, I then uninstalled mod_mono from WHM.

Next, I decided install mod_mono 2.10.2 (with mono 2.11.something) manually. It was a painful process involving the blackest of magicks, but eventually I got it to compile. It works fine, but I cannot for the life of me get it to use ASP.NET 4 instead of 2.

I've set up my config as such:

/usr/local/apache/conf/httpd.conf - no changes from WHM default.

/usr/local/apache/conf/includes/pre_main_global.conf: - WHM adds an include for this file near the top of httpd.conf

Include /usr/local/apache/conf/mod_mono.conf

#this should make it use ASP.NET 4
MonoServerPath /usr/bin/mod-mono-server4

/etc/httpd/conf/userdata/std/2/sitename/beta_asp.conf - WHM includes this inside the <VirtualHost> directive

Alias /beta /home/sitename/public_html_beta

AddMonoApplications default "/beta:/home/sitename/public_html"

<Location /beta>
    SetHandler mono

What am I doing wrong? What is the mod_mono equivalent of changing the application pool to be v4?

  • Why do you have cPanel/WHM in the first place? If you're just running your own web site, they do nothing but get in your way. Feb 27, 2013 at 5:20
  • A valid question. Unfortunately, when I got the server, I wasn't aware of that. It is generally not that big of a problem, and it would be more hassle to get rid of it (wipe the machine, restore from backup) than I am willing to induce right now.
    – Mike Caron
    Feb 27, 2013 at 6:01
  • 1
    The thing about beating your head against a brick wall is, it feels really good when you stop. Feb 27, 2013 at 6:01
  • Maybe, but regardless, I don't think my problem has to do with WHM. If you know better, feel free to post an answer!
    – Mike Caron
    Feb 27, 2013 at 6:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.