Current time: 11-16-2024, 11:23 AM Hello There, Guest! (LoginRegister)


Post Reply 
Mod Mono
Author Message
achioo Offline
Junior Member
*

Posts: 76
Joined: Nov 2006
Reputation: 0
Post: #1
Mod Mono
Anyone got Mod Mono working?
11-20-2007 11:08 AM
Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #2
RE: Mod Mono
achioo Wrote:Anyone got Mod Mono working?

I've spent some time messing with this in the past... It should be easy to get running. Are you just looking for a mod to the tpl files to add in the mono configuration per vhost?

I was really looking into mono hosting in the past, but there currently isn't an "easy" way to run a users mono site as their account. I like to keep my shared server users seperated as much as possible... If you are ok with this though, then it should be easy to setup.

I may throw this together to play with... Let me know what you're looking for and i'll take a crack at the tpl file changes.
11-20-2007 04:46 PM
Find all posts by this user Quote this message in a reply
achioo Offline
Junior Member
*

Posts: 76
Joined: Nov 2006
Reputation: 0
Post: #3
RE: Mod Mono
Well I think the tpl file will be an easy change. I was thinking of making a /asp directory to run their .asp files and having that in the root directory with htdocs. That would actually allow them to be restricted and SUExec should still work I think...
11-20-2007 11:36 PM
Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #4
RE: Mod Mono
Fair enough. Smile

I was more concerned with HOW to setup the server to do efficient mono hosting, and not so much with the actual tie-in to ispcp at this time.

With the current release of mono you have a few options...

1. You can run mod_mono, and let it handle creating of your worker processes, but then all of them are going to be running under the same user (apache), or even all under one worker process (if you Auto Hosting enabled). The first configuration suffers from security issues, while the second one seems even worse. Both of these implementations also suffer from the asp.net application lifecycle restarting every time you do an apache reload/restart. If you are familiar with asp.net, this can be a very bad implementation, as a lot of sites take a good time to start up the first time, and also maintain a lot of application state...

2. Alternatively you could kick off your own mod-mono-server processes (xsp) running as the correct user and setup mod_proxy to properly proxy, allowing xsp to only handle the asp.net related files. This would move the lifecycle management outside of apache, however we would have to write something to kick off the processes if they aren't started, as well monitor them to restart them if they crash or something... Doing this was also allow you to easily move your xsp processes off to one or more "Application Servers", which is a good option for scalability/redundancy. This option seems like a lot of work, but when i was looking into it, seemed like the only real way to run a solid mono hosting platform. As it gives a seperate lifecycle management, allows you to run the applications as the user that owns the site.

3. Yesterday, I saw that fastcgi-mono-server will be part of mono-1.2.6. Smile This is news to me, as I've not been paying much attention to mono for several months. I haven't read too much into this, but it seems like it would provide a half way point, allowing you to run the processes as a user (through SuExec) but not have to worry about processes management. However with this implementation i believe you'd still restart each application each time the apache server reloads/restarts. This isn't just an inconvienence either... I did some tests in the past to see how the server would handle load on a restart when say hosting a lot of asp.net sites, and the overhead of kicking off the processes on a restart pretty much brings down the server. So i really don't think its practical to let the application be restarted everytime apache is. If I'm missing some details on the fastcgi-mono-server implementation, please let me know...


As for putting the asp.net stuff in a seperate folder... Would you want them to be able to run asp.net and php on the same subdomain? Or would you want that as a choice when setting up the base site (www.) and each subdomain? I'm not sure if seperating the asp.net stuff into a seperate folder parallel to htdocs makes much sense there. I would expect asp.net files to be located inside htdocs, and just have the proper settings in the apache vhost to allow execution.


Anyway, sorry if I am rambling, I just was looking into this quite a bit in the past, and decided to hold off on it because it wasn't at the point where I thought it practical to offer for a shared server environment.

Just some ideas/comments, let me know what you think...
11-21-2007 04:41 AM
Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #5
RE: Mod Mono
Has anyone done any investigation/testing with fastcgi-mono-server? I'd be very interested to hear about your findings... Sadly I just don't have to time to look into it myself right now...
11-25-2007 11:59 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)