On 19/11/2006, at 5:42 AM, Gareth Kirwan wrote: > > Completely agree, I've been using lighttpd since last night now, > and my > configuration looks like this: > > fastcgi.map-extensions = ( ".js" => ".dynamic", > "/" => ".dynamic", > ".css" => ".dynamic") > $HTTP["url"] !~ "/webrent3/gfx/" { > fastcgi.map-extensions += ( ".gif" => ".dynamic", > ".jpg" => ".dynamic", > ) > } > > fastcgi.server = ( ".dynamic" => > ( "localhost" => > ( "socket" => > server.document-root+"server/sockets/mason-fastcgi.socket", > "bin-path" => > server.document-root+"server/mason-handler.fcgi", > "check-local" => "disable" > ) > ) > )
This is great! It honestly never occurred to me to use the map- extensions that way, and I had multiple instances of fastcgi.server for different file extensions. I wrote the original recipe on the lighttpd wiki, I will see about adding this to it. What I'd like to do is setup a fairly good stock configuration with a few goals: * mandate file extensions to be used for mason content * still allow other things (like php for example) * allow serving (via mason) files out of public_html user dirs * allow for database connection information to be instantiated per user, perhaps based on homedir config data * also allow virtual hosting to be setup trivially, hostname maps to a directory If we instantiate a mason handler for each user, they can all have their own '$dbh' (or whatever). I think :-) Plus any other globals they'd like to use. I'm thinking 'hosting environment' of course. It bugs me a lot that Mason is far superior to PHP, but the setup is difficult and arbitrary. With any PHP hoster you can reasonably expect that: * files in a directory called ".php" will be processed by php * the system will load index.php for directory requests * you can use $foo and not expect that someone else's site can look at $foo and see your data (yes I am well aware that this is only the case with global vars, however you really need a couple of globals to get any useful persistence of things like database connections) Yes, I'm dreaming of the "Standard Mason Hosting Setup". I know you can't be all things to all people, but if nothing else, owning a Mac has showed me you *can* be 95% of the things to 95% of the people. The other 5% will moan, and roll their own solutions. Right now 100% are rolling their own solutions. As a result I don't think there is a single Mason app you could just drop in anywhere and expect it to work. I think I could download 100 PHP applications and put 95 of them in a directory and have them work. I think lighttpd gives the flexibility to do all I said, with a smart enough handler, and FastCGI. Maybe someone could 'backport' it to Apache later :-) As long as we retain the ability to roll as custom a setup as desired, would having a documented standard setup gain any traction with the Mason team and community? If if I'm just dreaming, let me know that too :-) - Justin (as far as I know we still need http://www.masonhq.com/docs/manual/ 1.28/CGIHandler.html#calling_abort___under_cgihandler fixed to make all this a reality :-) -- Justin Hawkins [EMAIL PROTECTED] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users