ASP.NET MVC on Ubuntu with NGINX

ASP.NET MVC on Ubuntu with NGINX

Phill Luby
17th September 2025

Home Insights ASP.NET MVC on Ubuntu with NGINX

We’ve just published an early working version of an on-line service created by NewRedo, however, although written in ASP.NET MVC 2, it’s not running on a Microsoft server. Instead we’re running on Ubuntu 11.10 using the NGINX web server.

First, a little about the service. It’s a system for booking time off work, and keeping track of the time you’ve booked off. Although it’s in a very early stage, it’s usable right now and we will not lose any data when it finally goes ‘live’. To try this please visit FlitHub.

Ubuntu 11.10 server edition comes comes with very little installed, but by adding just two packages you can have yourself an ASP.NET web server. These packages are installed as follows:

apt-get install nginx mono-fastcgi-server4

This will automatically install Mono if it’s not there already, and it set’s up a web site on port 80. The gory details of the setup can be found on the mono website in their article FastCGI Nginx. However, we opted for a few deviations. For our system, I created a new configuration file in /etc/nginx/sites-available, and hard linked that into /etc/nginx/sites-enabled, just like you would with Apache HTTP Server. Also, rather than editing the installed configuration files, I included the extra fastcgi_param directives in our site configuration file. Upgrades and repairs are slightly easier if you avoid changing configuration files that are provided by the package installation.

I had a little trouble running the FastCGI server with the right parameters. I found that omitting the domain name worked best:

fastcgi-mono-server4 /applications=/:/var/www/www.domain1.xyz/ /socket=tcp:127.0.0.1:9000

I won’t cover getting this all working at start-up as there is a sample script on referenced on the Mono FastCGI article, simply copy this and make the appropriate adjustments. When I get time I hope to write a generic startup script that uses configuration from /etc/fastcgi-mono-server4 to find the websites.

One other consideration was the server memory. We created a cloud-based server with 256MB of memory to see how it would handle the load. After starting the system and hitting a few pages we found that the server is running happily with 33MB spare.

To summarise Ubuntu 11.10 can run ASP.NET applications perfectly well on a small virtual server.

Share Article

Insights.

How to Run a Code Club
How to Run a Code Club

We’re hosting a Code Club community training evening to allow anyone who is thinking of becoming a Code Club volunteer an opportunity to find out more about Code Club and get an insight into what to expect and how to… 

Discover More
Building RaceBest
Building RaceBest

This year saw the launch of a new service from Leeds-based start-up RaceBest Ltd. NewRedo were responsible for building their online system and we continue to host and support it. In building the system we utilised some of the latest… 

Discover More
What is an Agile Software Team Anyway?
What is an Agile Software Team Anyway?

There are a few questions I get asked in convoluted form. This is one of them. In this safe haven I’ll try to explain what an agile software team is in the most straightforward way I can. Aiming this at customers,… 

Discover More