# $Header: /cvsroot/aolserver/aolserver3/scripts/nsd.tcl,v 1.12 2000/04/12 15:52:37 kriston Exp $ # # nsd.tcl -- The AOLserver Startup Script # # This is a Tcl script that is sourced when AOLserver starts up. # A detailed reference is in "doc/config.txt". # ns_log notice "nsd.tcl: starting to read config file..." # # Set some Tcl variables that are commonly used throughout this file. # set httpport 80 set httpsport 443 set hostname "web.fisicc-ufm.edu" set address "216.230.145.198" set servername "fisicc" set serverdesc "FISICC Server" set dbuser "web" set dbpass "web_user_password" set dbdatasource "web.fisicc-ufm.edu" set homedir /aolserver set bindir ${homedir}/bin set pageroot /web/${servername}/www set libraryroot /web/${servername}/tcl set paramroot /web/${servername}/parameters set directoryfile index.adp,index.html,index.tcl # nscp: Uncomment the sample password and log in with "nsadmin", password "x", # type "ns_crypt newpassword salt" and put the new encrypted string below. set nscp_user "" #set nscp_user "nsadmin:t2GqvvaiIUbF2:" ;# sample user="nsadmin", pw="x" # # Global server parameters # ns_section "ns/parameters" ns_param user nsadmin ns_param home $homedir ns_param debug false ns_param auxconfigdir $paramroot ns_param StackSize 500000 # # Thread library (nsthread) parameters # ns_section "ns/threads" ns_param mutexmeter true ;# measure lock contention #ns_param stacksize [expr 128*1024] ;# Per-thread stack size for hungry C modules. # # MIME types. # # Note: AOLserver already has an exhaustive list of MIME types, but in # case something is missing you can add it here. # ns_section "ns/mimetypes" ns_param default "*/*" ;# MIME type for unknown extension ns_param noextension "*/*" ;# MIME type for missing extension #ns_param ".xls" "application/vnd.ms-excel" ############################################################ # # Server-level configuration # # There is only one server in AOLserver, but this is helpful when multiple # servers share the same configuration file. This file assumes that only # one server is in use so it is set at the top in the "server" Tcl variable. # Other host-specific values are set up above as Tcl variables, too. # ns_section "ns/servers" ns_param $servername $serverdesc # # Server parameters # ns_section "ns/server/${servername}" ns_param directoryfile $directoryfile ns_param pageroot $pageroot ns_param globalstats true ;# Enable built-in statistics ns_param urlstats true ;# Enable URL statistics ns_param maxurlstats 1000 ;# Max number of URL's to do stats on ns_param enabletclpages true ;# Parse tcl files in pageroot (dangerous) # Directory listings -- use an ADP or a Tcl proc to generate them. #ns_param directoryadp $pageroot/dirlist.adp ;# Choose one or the other #ns_param directoryproc _ns_dirlist ;# ...but not both! #ns_param directorylisting simple ;# Can be simple or fancy # # ADP (AOLserver Dynamic Page) configuration # ns_section "ns/server/${servername}/adp" ns_param map "/*.adp" ;# Extensions to parse as ADP's #ns_param map "/*.html" ;# Any extension can be mapped ns_param enableexpire false ;# Set "Expires: now" on all ADP's ns_param enabledebug false ;# Allow Tclpro debugging with "?debug" # ADP special pages #ns_param errorpage ${pageroot}/errorpage.adp ;# Pretty-print ADP scripting errors # # ADP custom parsers -- see adp.c # ns_section "ns/server/${servername}/adp/parsers" ns_param adp ".adp" # # Socket driver module (HTTP) -- nssock # ns_section "ns/server/${servername}/module/nssock" ns_param port $httpport ns_param hostname $hostname ns_param address $address # # Control port -- nscp # # nscp does not load unless nscp_user is a valid user. # ns_section "ns/server/${servername}/module/nscp" ns_param port 9999 ns_param address "127.0.0.1" ;# LOCALHOST IS RECOMMENDED ns_section "ns/server/${servername}/module/nscp/users" ns_param user $nscp_user # # Access log -- nslog # ns_section "ns/server/${servername}/module/nslog" ns_param rolllog true ;# Should we roll log? ns_param rollonsignal true ;# Roll log on SIGHUP ns_param rollhour 0 ;# Time to roll log ns_param maxbackup 5 ;# Max number to keep around when rolling # # CGI interface -- nscgi # ns_section "ns/server/${servername}/module/nscgi" ns_param map "GET /cgi /web/${servername}/cgi" ns_param map "POST /cgi /web/${servername}/cgi" # # Modules to load # ns_section "ns/server/${servername}/modules" ns_param nssock ${bindir}/nssock.so ns_param nslog ${bindir}/nslog.so ns_param nscgi ${bindir}/nscgi.so #ns_param nsperm ${bindir}/nsperm.so ns_param nsopenssl ${bindir}/nsopenssl.so # nscp: loads only if nscp_user is set (see top of this file). if { $nscp_user != "" } { ns_param nscp ${bindir}/nscp.so } else { ns_log warning "nsd.tcl: nscp not loaded because user/password is not set." } # # nsopenssl # ns_section "ns/server/${servername}/module/nsopenssl" ns_param Port ${httpsport} ns_param Hostname ${hostname} ns_param Address ${address} ns_param CertFile certificate ns_param KeyFile key ns_param Debug on ns_param SessionCacheSize 512 ns_param SessionCacheTimeout 300 ns_param Protocol "SSLv2, SSLv3, TLSv1" ns_param CipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP" # # db drivers # ns_section "ns/db/drivers" ns_param oracle ora8.so # # db pool main # ns_section "ns/db/pool/main" ns_param Driver oracle ns_param Connections 4 ns_param DataSource ${dbdatasource} ns_param User ${dbuser} ns_param Password ${dbpass} ns_param Verbose off ns_param ExtendedTableInfo on # # db pool subquery # ns_section "ns/db/pool/subquery" ns_param Driver oracle ns_param Connections 4 ns_param DataSource ${dbdatasource} ns_param User ${dbuser} ns_param Password ${dbpass} ns_param Verbose off ns_param ExtendedTableInfo on # # db pool log # ns_section "ns/db/pool/log" ns_param Driver oracle ns_param Connections 4 ns_param DataSource ${dbdatasource} ns_param User ${dbuser} ns_param Password ${dbpass} ns_param Verbose off ns_param ExtendedTableInfo on # # db pools # ns_section "ns/db/pools" ns_param main main ns_param subquery subquery ns_param log log # # # ns_section "ns/server/${servername}/db" ns_param Pools * ns_param DefaultPool main # # Tcl # ns_section "ns/server/${servername}/tcl" ns_param autoclose true ;# Close files the Tcl interp opened ns_param debug false ;# Names of files sourced is logged ns_param nsvbuckets 8 ;# No. of buckets to hold nsv's ns_param statlevel 0 ;# How many levels deep to run tclstats ns_param statmaxbuf 100 ;# Maximum entries in tclstats table ns_param library $libraryroot # we have to source the private server tcl file source /web/${servername}/parameters/${servername}.tcl ns_log notice "nsd.tcl: finished reading config file."