Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

mod_mono: how to turn on for a domain?

Discussion in 'cPanel Developers' started by nat, Jan 19, 2008.

  1. nat

    nat Well-Known Member

    Jan 16, 2003
    Likes Received:
    Trophy Points:
    WHM 11.15.0 cPanel 11.17.0-S19434
    REDHAT Enterprise 4 i686 on standard - WHM X v3.1.0

    I installed mod_mono using easyapache to run ASP.NET pages.

    I read somewhere in the forum to turn it on for an individual domain using /scripts/addasp. Then I read that that script is no longer used.

    I read somewhere else that it needs to be turned on for the domain in Cpanel but I don't see anyway to do so in theme X3.

    A test aspx scrpit returns the error...

    Server Error in '/' Application
    System.Web.HttpException: Directory not found

    The test script is...

    <%@ Page Language="C#" %>  
    <script runat="server">  
    void Button1_Click(object sender, EventArgs e)   
      titleTag.InnerText = "You clicked the button!";  
    void Page_Load(object sender, EventArgs e)   
      if (!IsPostBack)  
        titleTag.InnerText = "Page has loaded";  
    <title runat="server" id="titleTag"/>  
    <form runat="server">  
      <asp:Button id="Button1" OnClick="Button1_Click" runat="server" Text="Button"/

    I copied the directory /opt/mono/lib/xsp/test to my domain and ran index.aspx and receive the same error.

    How do I turn on mod_mono for a domain?
    #1 nat, Jan 19, 2008
    Last edited: Jan 19, 2008
  2. Calibur747

    Calibur747 Member

    Jun 3, 2006
    Likes Received:
    Trophy Points:
    To me that is just a bug :( I have been fiddling around with mod_mono for a client today and it has been a hell of a job.

    I upgraded cpanel to the latest stable build last night, then rebuilt apache up to the latest standards of everything, and added mod_mono.

    I have come to realize that by default, mod_mono_server1 is installed instead of server2 which has visualbasic support and added functionality.

    What I did was right under Include "/usr/local/apache/conf/mod_mono.conf" I added
    MonoServerPath /opt/mono/bin/mod-mono-server2

    If you have root access to your box, log in and run ps aux - near the apache processes you will see mod-mono-server2 running so you know that it is alive.

    Aside from getting it running however, there isn't much more you can do I don't think. It is beta/quirky and support is non-existent. My client who wants to do aspx files will just have to hope he codes in a way that mono can understand.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice