Wednesday, August 27, 2008

Cloud Computing: Mono Setup on Amazon EC2

Mono Setup on Amazon EC2 with optional config for MonoRail

Prerequisites: Familiar with create and launching instances using Amazon EC2, and familiar with editing config files in linux.

Links to documentation on Amazon EC2 and how to create and launch instances:

click on Technical documentation link.

For porting application to Mono see article:

1) Create Ami instance from pre-existing instance and launch instance.

Use ami-0abe5a63, see url:


2) Update Apache on this instance. This instance is a Fedora 8 image with Apache

Edit /etc/httpd/conf/httpd.conf

Add these entries to the end to use test app from mono:

MonoServerPath default /opt/mono-1.9.1/bin/mod-mono-server2

Alias / “/opt/mono-1.9.1/lib/xsp/test”

AddMonoApplications default “/:/opt/mono-1.9.1/lib/xsp/test”

<Location />

MonoSetServerAlias default

SetHandler mono

<Location />

Here is other entry example (notice using MonoApplications instead of AddMonoApplications)

(not sure why examples differ), but both syntax work:

Alias hellomonoweb “/opt/mono-1.9.1/lib/xsp/hellomonoweb”

MonoApplications “/hellomonoweb:/opt/mono-1.9.1/lib/xsp/hellomonoweb”

<Location />

SetHandler mono


Important to disable case sensitivity for files and file paths add this entry. This prevents issues like file not found due to differences between Linux and Windows handling of case sensitivity for files and file paths:

MonoSetEnv MONO_IOMAP=all

3) Optionally, if you are using MonoRail, a .Net implementation of Ruby on Rails ( see, add the following entry to /etc/httpd/conf.d/mod_mono.conf:

AddType applications/x-asp-net .rails


  1. Thanks for the hints - this is something I have to do in a couple of months, so good to know others have already been there, done that!

  2. That was a great post on Cloud Computing. Thanks for sharing it here. By the way have you heard about Cloudslam 2010 conference which is a upcoming event covering all the latest events and technologies on Cloud Computing. They also providing good opportunity to meet and talk with the world's leading experts of Cloud Computing.

  3. Thanks For Your valuable posting, it was very informative. Am working inCloud Erp In India