Updated 2014-08-22 10:55:12 by achisholm

MainSource Code Downloads API Documentation Mailing ListsBugs Developers

Tcl example edit

A simple config that enables the Tcl Library.
set        homedir               /usr/lib/naviserver

set        server_name           alpha

set        address               192.168.1.130
set        port                  80


ns_section        "ns/server/${server_name}/modules"
   ns_param       nssock           ${homedir}/bin/nssock.so


ns_section        "ns/parameters"
   ns_param       home             $homedir


ns_section        "ns/servers"
   ns_param       $server_name     "Naviserver $server_name"


ns_section        "ns/server/${server_name}/fastpath"
   ns_param       pagedir          /var/www/alpha.co.uk/public_html


ns_section        "ns/server/${server_name}/tcl"
   ns_param       library          /var/www/alpha.co.uk/tcl


ns_section        "ns/module/nssock"
   ns_param       port             $port
   ns_param       address          $address
   ns_param       defaultserver    $server_name


ns_section        "ns/module/nssock/servers"
   ns_param       $server_name     "Naviserver $server_name"

Note

If a Tcl directory is specified, the init.tcl file in that directory is sourced first (if it exists), and then all the remaining .tcl files are sourced alphabetically.