On Monday 20 February 2006 09:45, Bas Scheffers wrote: > Tom Jackson wrote:
> > What you can do is to write a simple filter which rewrites the url to > > some other place under pageroot which is blocked from direct access. You > > could, > > Sound like that would be harder (config wise) for the users, not optimal. > Check out my package-name-init.tcl files, this is where you put filters so that they load with the package. My session package has the best example of this, and also even uses ns_rewriteurl for urls which contain an embeded session id. (SID). I think it is a mistake to put all files under the package, outside of pageroot, or at least to force this to be the case. It essentially means that every file must be served by a filter. You can still put your package page files under pageroot and then include a filter to just rewrite the url, which will let AOLserver take over. > > Loading C level modules using the AOLserver api will likely need to be > > done at the correct time, before tcl modules are sourced, so I don't see > > how to jump ahead and read a tcl configuration file to load an AOLserver > > C module. However, if it is just a Tcl .so module, you can do this easily > > right now. > > Reading http://www.aolserver.com/docs/devel/c/api/c-ch393.htm, it sounds > like any of your own C modules load before nsd starts sourcing the Tcl > libraries (modules/tcl), so you should be able to tell it to go look > somewhere else for them too. I'll keep looking. One down, one to go. Every C module is listed in /ns/server/$server/modules and has an exact path to the shared library file. Tcl modules contain only the name of the directory under the private tcl directory to look for an init.tcl file. ns_section "ns/server/$server/modules" ns_param my_c_module /path/to/my_c_module.so ns_param my_tcl_module tcl so /path/to... could anywhere on the machine. my_tcl_module must be located under $private_tcl_lib/my_tcl_module. In my case all my packages are part of a tcl module twt, so I never have to add anything to the server.tcl file when I change the configuration of my packages. tom jackson -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
