[Mono-dev] How can I have mono FastCGI run ONE application for several virtual directories ?

quandary quandary82 at hailmail.net
Mon Jan 16 22:19:04 UTC 2012

Hi !

I have my ASP.NET MVC3 Razor WebApplication running on a Linux server 
with nginx via fastcgi-mono-server4.
So far everything works fine.

But I have a question:
When I start up fastcgi-mono server, I need this
to have the application in     "/var/www/www.domain1.xyz"        serve 

Now, if I also want to serve "domain1.xyz" (without www), I need to also 
add "domain1.xyz" pointing to the same directory.
Like this:

This also works fine.

But my application is a chat application, so it stores all submitted 
messages in global.asax, so that they can be submitted to every other user.
This works fine, as long as all users are on the same domain 
(www.domain.xyz XOR domain.xyz).
But all users visiting domain1.xyz should also see what users on 
www.domain1.xyz wrote, and vice-versa (www.domain.xyz OR domain.xyz).
However, this is not possible, because www.domain1.xyz runs in a 
separate process from domain1.xyz.
How can I make two different virtual hosts use the same application 
(only one instance) ?

Note that the question isn't that much about that chat application.
I used it simply to check the fastcgi-behaviour for multiple domains per 
For the chat application, I could solve this by simply redirecting every 
request for domain.xyz to www.domain.xyz.

But I am writing a wiki application that works similar to blogspot:

And then display the content for every CUSTOMSUBDOMAIN in ONE 
application, by switching data-retrival & presentation according to the 
server-variable "host" in the web-application.

How can I have fastcgi use the same application for all those subdomains ?

I thought before I start wasting time by hacking and raping the code in 
Mono.WebServer and Mono.WebServer.FastCgi, it would be a good idea to 
first ask whether this isn't already possible.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120116/92ceaeda/attachment.html>

More information about the Mono-devel-list mailing list