Hi,
I am proposing new directory structure for /usr/local/ns, current
installation of naviserver comes from aolserver multi-server environment
which is not very usual. For beginners it is very confusing, for
advanced users it does not matter because they customize it as they want.
What do you think about this:
/usr/local/ns
bin
conf
include
lib
html
tcl
logs
modules
The only changes need to be made in Makefile and sample-config.tcl. Also
something like nsd.start in bin/ would be usefull as well. It looks very
like Apache/Tomcat and this is not bad.
sample-config.tcl could be changed into nsd.tcl and put into
conf/nsd.tcl upon install.
Changes in sample-config.tcl:
set home /usr/local/ns
ns_section "ns/server/${server}"
ns_param pageroot ${home}/html
ns_section "ns/parameters"
ns_param serverlog ${home}/logs/nsd.log
ns_param pidfile ${home}/logs/nsd.pid
ns_section "ns/mimetypes"
ns_param default text/plain
ns_param noextension text/plain
source ${home}/etc/mime.tcl
ns_section "ns/server/${server}/fastpath"
ns_param serverdir ${home}
ns_param pagedir html
ns_section "ns/server/${server}/tcl"
ns_param library ${home}
ns_section "ns/server/${server}/module/nslog"
ns_param file ${home}/logs/access.log
In mime.tcl i keep long list(504 lines) of all known mime types, it is
easier to add/modify this file and keep server up-to-date with new mime
types. I'd like to add it to distribution.
bin/nsd.start is
#!/bin/bash
USER=nobody
GROUP=nobody
BIN=/usr/local/ns/bin/nsd
CFG=/usr/local/ns/conf/nsd.tcl
LOG=/usr/local/ns/logs/nsd.log
touch $LOG
chown $USER $LOG
exec $BIN -i -u $USER -g $GROUP -t $CFG >> $LOG 2>&1
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/