On Tue, 11 Mar 2003, Tom Jackson wrote: > Tomasz Kosiak wrote: > > >Thta is not exactly true. They adjust both url filters and handlers > >registered in urltrie. You can easily enhance fastpath registered proc to > >take pageroot from arg given to registration and then you can serve static > >content from virtual host pageroot. You can achive that and even more with > >my second proposal, ns_url2file_map command which is vserver aware. > > > > > I was speaking of the code I have seen, obviously you can write code to > handle static content.
It is already there in my proposal. Yoy can set new pageroot for any vserver with somtehing like this: ns_url2file_map -vserver vs1::server1 / /path/to/vs1/pageroot The fact is you can write code to do it without > mucking with the core. However, to adjust pageroot, you would need to > modify the core. > > >Anyway my proposal is not strictly virual hosting solution. It allows some > >kind of virtual hosting - handling many urlspaces in one server. > > > Your code is good, I'm not questioning your solution. The issue with > virtual hosting is that any two developers will have two different well > thought out ways of providing virtual hosting. Making changes to how the > core works and changes to the core api (not additions to) is a very > heavy handed way of supporting a single virtual hosting solution. I belive my proposal doesn't break any C or Tcl API so it is rather addition not change to the core. I'm surprised myself that so much functionality could be achived by so small changes. So that's why I propose to include it in the core. > AOLserver already fully supports virtual hosting using registered > filters and registered procs. The fact that you have to write a few > lines of code to tweak that support isn't very important. Yes you *can* do it. But my proposal aims at doing it simpler and in more standard way. Using registered procs you have to write your own implementation for every type of request handler (like in OpenACS). But it will be probably not as functional as the one proposed which already exists in AOLserver core. > >But this doesn't solve problem of having no real pageroot. I've got > >subdirectories in packages (like in OpenACS) that I would like to expose > >at some URL prefixes. Fixed filesystem layout is essential for application > >modularity and for code version control with CVS. I have no idea how to > >manage it the other way. > > > > I guess I don't understand what you can't do. What is the problem of 'no > real pageroot'? I mean that with nsrewrite you can map from some url to the other url, but you can't map to files outside of your pageroo. Or you have to define your pageroot to include all package dirs which is not very wise in my opinion. Since you mention OpenACS, I am guessing that you want > to maintain your code in modular packages and 'mount' those at multiple > places, creating a virtual filesystem. If that is what you are after, > just use the OpenACS rp filter, why modify the core code? OpenACS rp_filter is quite complex piece of TCL code. It duplicates functionality of urltrie to handle URL space. I wonder if it would be ever created if you have urltrie functinality from AOLserve core exposed in TCL API. My proposal could be usefull for people not using OpenACS, who do not want to maintain such complex code as rp_filter themself. I'm glad we can discuss my proposal so it would be easier to decide what to do with it. --tkosiak I. To remove yourself from this list: Send a message to "[EMAIL PROTECTED]" with the following text in the BODY of your message: signoff aolserver II. For a complete list of listserv options please visit: http://listserv.aol.com/ III. For more AOLserver information please visit: http://www.aolserver.com/
