Conf/Servers
Revision as of 09:50, 21 December 2011 by Visitatvishal (talk | contribs) (Created page with '== ns_section "ns/servers" == ; $server : Name of virtual server. '''Server parameters''' ; |directoryfile …')
ns_section "ns/servers"
- $server
- Name of virtual server.
Server parameters
- |directoryfile
- List of files to use (index.html)
- |pageroot
- Directory under which all pages live
Tuning options
- |connsperthread
- Normally there's one conn per thread
- |maxthreads
- Tune this to scale your server
- |minthreads
- Tune this to scale your server
- |threadtimeout
- Idle timeout for connection threads
- |maxconnections
- Max connections per connection thread before it is shut down
- |spread
- Variance factor for threadtimeout and maxconnections to prevent mass mortality of theads (e.g. +-20%)
Limits
- |maxline
- Max line length from client
Directory listings can be generated with an ADP or a Tcl proc
- |directoryadp
- Choose one or the other
- |directoryproc
- ...but not both!
- |directorylisting
- Can be simple or fancy (for ns_dirlist)
Miscellaneous
- |checkmodifiedsince
- Check url if no If-Modified-Since?
- |enableaolpress
- Enable extra features used by AOLpress
- |headercase
- tolower, toupper, preserve
Internal redirects
- |404
- Not Found error page
- |500
- Server Error page
Internal redirects # # Fastpath serves HTML # ns_section "ns/server/${servername}/fastpath" ns_param cache true ;# Enable cache for normal URLs; default: false ns_param cachemaxentry 8192 ;# Largest file size allowable in cache; default: cachemaxsize/10 ns_param cachemaxsize [expr 5000*1024] ;# Size of fastpath cache; default: 5120000 ns_param mmap false ;# Use mmap() for cache; default: false ns_param directoryfile index.adp,index.tcl,index.html,index.htm ;# String. Directory index/default page to look for. ;# Optional, default is directoryfile parameter set in ;# ns/server/${servername} section. ns_param directorylisting fancy ;# Directory listing style. ;# Optional, can be "fancy" or "simple". ns_param directoryproc _ns_dirlist ;# String. Name of Tcl proc to use to display ;# directory listings. Optional, default is to use ;# _ns_dirlist. You can either specify directoryproc, ;# or directoryadp - not both. ;#ns_param directoryadp dir.adp ;# String. Name of ADP page to use to display directory ;# listings. Optional. You can either specify directoryadp ;# or directoryproc - not both. # # Tcl interpreter # ns_section "ns/server/${servername}/tcl" ns_param debug false ;# Names of files sourced is logged ns_param nsvbuckets 8 ;# No. of buckets to hold nsv's ns_param library "$home/servers/${servername}/modules/tcl" ;# Private tcl library for the server