Category Archives: mono

Mono and ISPConfig 3

We use Linux quite a bit. Mono is  a great tool if your app is built to run on it. Installing it is easy enough (yum install mod_mono, a2enable mod_mono, etc..) but you have to take 2 additional steps to enable it on each website before it actually works.

As an admin user in ISPConfig, go to the site and the “Options” tab. In the Apache Directives paste in the following code (replace website.com with the name of your site).

MonoAutoApplication enabled
 MonoDocumentRootDir "/var/www/website.com/web/"
 MonoServerPath example "/usr/bin/mod-mono-server4"
 MonoApplications website "/:/var/www/website.com/web/"
 Alias /mono "/var/www/website.com/web/"
 <Directory /var/www/website.com/web/>
 SetHandler mono
 MonoSetServerAlias website
 AddHandler mod_mono .aspx .ascx .asax .ashx .config .cs .asmx
 </Directory>

After that, make sure to change the ownership of the web folder to www-data (or whatever username your apache web service is running under) .

chown -R www-data /var/www/website.com/web

Once you turn this on, throw an ASPX page in the folder and try it out.

If you have a problem you can look for errors here:

tail /var/log/apache2/error.log

Be aware that turning this on will mess with other scripts specifically PHP.

Written by: Ray Pulsipher