Difference between revisions of "Conf/Server"

From AOLserver Wiki
Jump to navigation Jump to search
(Created page with '== ns_section "ns/server/${servername}/adp" == '''ADP features''' ; directoryfile :List of files to use (index.html)')
 
Line 2: Line 2:
 
      
 
      
 
'''ADP features'''
 
'''ADP features'''
; [[Conf/Parameters/Directoryfile | directoryfile]]
+
; [[Conf/Parameters/Map | map]]
:List of files to use (index.html)
+
:Extensions to parse as ADP's
 +
 
 +
; [[Conf/Parameters/Map.html | map.html]]
 +
:Any extension can be mapped
 +
 
 +
; [[Conf/Parameters/Enableexpire | enableexpire]]
 +
:Set "Expires: now" on all ADP's
 +
 
 +
; [[Conf/Parameters/Enabledebug | enabledebug]]
 +
:Turn on Tclpro debugging with "?debug"
 +
 
 +
; [[Conf/Parameters/Debuginit | debuginit]]
 +
:Debug procedure
 +
 
 +
'''ADP tuning'''
 +
 
 +
; [[Conf/Parameters/Cache | cache]]
 +
:In-memory cache of ADP's
 +
 
 +
; [[Conf/Parameters/Cachesize | cachesize]]
 +
:In-memory cache size of ADP's
 +
 
 +
; [[Conf/Parameters/Errorpage | errorpage]]
 +
:Pretty-print ADP errors with an ADP
 +
 
 +
; [[Conf/Parameters/Startpage | startpage]]
 +
:Page to include for all ADP's
 +
 +
'''ADP custom parsers -- see adp.c'''       
 +
 +
; [[Conf/Parameters/Adp | adp]]
 +
:The simple parser looks for <\% ... \%>
 +
 
 +
; [[Conf/Parameters/Fancy | fancy]]
 +
:The fancy parser does a lot more.
 +
 +
'''Socket driver module (HTTP)  -- nssock'''
 +
 
 +
; [[Conf/Parameters/Port | port]]
 +
:Port for HTTP (typically 80)
 +
 
 +
; [[Conf/Parameters/Hostname | hostname]]
 +
:This is not the same as your hostname
 +
 
 +
; [[Conf/Parameters/Port | port]]
 +
:Port for HTTP (typically 80)
 +
 
 +
; [[Conf/Parameters/Address  | address ]]
 +
:This is not the same as your host addr
 +
 
 +
; [[Conf/Parameters/Location | location]]
 +
:URL for auto-redirects (trailing slash)
 +
 
 +
; [[Conf/Parameters/Maxinput | maxinput]]
 +
:Maximum file size for uploads in bytes, default is 1MB, new in AOLserver 4.01
 +
 
 +
; [[Conf/Parameters/Keepwait | keepwait]]
 +
:Max time conn is kept alive (keepalive)
 +
:(set to 0 to disable keepalive)
 +
 +
'''Socket driver module (HTTPS) -- nsssl''' 
 +
 
 +
 
 +
; [[Conf/Parameters/Port | port (HTTPS)]]
 +
:Port for HTTPS (typically 443)
 +
 
 +
; [[Conf/Parameters/Hostname  | hostname  (HTTPS)]]
 +
:his is not the same as your hostname
 +
 
 +
; [[Conf/Parameters/Address | address (HTTPS)]]
 +
:This is not the same as your host addr
 +
 
 +
; [[Conf/Parameters/Keyfile | keyfile]]
 +
 
 +
; [[Conf/Parameters/Certfile | certfile]]
 +
 
 +
'''Control port -- nscp''' 
 +
 
 +
; [[Conf/Parameters/Port | port (NSCP)]]
 +
:Control port listens on port 9999
 +
 
 +
; [[Conf/Parameters/Address | address (NSCP)]]
 +
:For security, use 127.0.0.1 only
 +
 +
'''Control port users''' 
 +
 
 +
; [[Conf/Parameters/User | user]]
 +
:sample user="nsadmin", pw="x"
 +
   
 +
'''Access log -- nslog'''
 +
; [[Conf/Parameters/File | file]]
 +
 
 +
 
 +
; [[Conf/Parameters/Formattedtime | formattedtime]]
 +
:true=common log format
 +
 
 +
; [[Conf/Parameters/Logcombined | logcombined]]
 +
:true==NCSA combined format
 +
 
 +
; [[Conf/Parameters/Maxbackup | maxbackup]]
 +
:Max number to keep around when rolling
 +
 
 +
; [[Conf/Parameters/Rollhour | rollhour]]
 +
:Time to roll log
 +
 
 +
; [[Conf/Parameters/Rolllog  | rolllog ]]
 +
:Should we roll log?
 +
 
 +
; [[Conf/Parameters/Rollonsignal  | rollonsignal ]]
 +
:Roll log on SIGHUP
 +
   
 +
   
 +
   
 +
    #
 +
    # CGI interface -- nscgi
 +
    #
 +
    # Note: CGI is *vastly* inferior to ADP's or even built-in Tcl libraries.
 +
    #
 +
    ns_section "ns/server/${servername}/module/nscgi"
 +
    ns_param  debug          false    ;# Be chatty in log
 +
    ns_param  gethostbyaddr  false    ;# Whether to do reverse DNS lookups
 +
    ns_param  limit          0        ;# Max number of concurrent CGI processes
 +
    ns_param  maxoutput      10240    ;# Max bytes allowed from external process
 +
    ns_param  buffersize      8192      ;# Buffer output from external process
 +
    ns_param  map  "GET /cgi /usr/local/cgi"        ;# Where your CGI executables live (GET)
 +
    ns_param  map  "POST /cgi /usr/local/cgi"      ;# Where your CGI executables live (POST)
 +
   
 +
    # CGI environment variable handling -- See admin guide
 +
    ns_param  systemenvironment false  ;# Copies environment from nsd start shell
 +
   
 +
   
 +
    #
 +
    # Access control (permissions) -- nsperm
 +
    #
 +
    ns_section "ns/server/${servername}/module/nsperm"
 +
   
 +
    #
 +
    # Unix domain socket driver -- nsunix
 +
    #
 +
    ns_section "ns/server/${servername}/module/nsunix"
 +
    ns_param  hostname        "host"    ;# Hostname used in response to client
 +
    ns_param  port            "port"    ;# Port to listen on
 +
    ns_param  socketfile      "path.name" ;# UNIX domain socket driver
 +
   
 +
    #
 +
    # Virtual Hosting redirector -- nsvhr
 +
    #
 +
    ns_section "ns/server/${servername}/module/nsvhr"
 +
    ns_param  busyurl        "url"    ;# Redirect here if back-end times out
 +
    ns_param  errorurl        "url"    ;# Redirect here on proxy errors
 +
    ns_param  method          "GET"    ;# Methods allowed to proxy
 +
    ns_param  method          "POST"    ;# Methods allowed to proxy (can have >1)
 +
    ns_param  timeout        30        ;# Timeout waiting for back-end
 +
   
 +
    # Register hosts to proxy
 +
    ns_section "ns/server/${servername}/module/nsvhr/maps"
 +
    ns_param  "www.tcpsocket.com"    "http://127.0.0.0:2000" ;# HTTP proxy
 +
    ns_param  "www.domainsocket.com" "unix://somehost"      ;# Domain socket

Revision as of 12:20, 21 December 2011

ns_section "ns/server/${servername}/adp"

ADP features

map
Extensions to parse as ADP's
map.html
Any extension can be mapped
enableexpire
Set "Expires: now" on all ADP's
enabledebug
Turn on Tclpro debugging with "?debug"
debuginit
Debug procedure

ADP tuning

cache
In-memory cache of ADP's
cachesize
In-memory cache size of ADP's
errorpage
Pretty-print ADP errors with an ADP
startpage
Page to include for all ADP's

ADP custom parsers -- see adp.c

adp
The simple parser looks for <\% ... \%>
fancy
The fancy parser does a lot more.

Socket driver module (HTTP) -- nssock

port
Port for HTTP (typically 80)
hostname
This is not the same as your hostname
port
Port for HTTP (typically 80)
address
This is not the same as your host addr
location
URL for auto-redirects (trailing slash)
maxinput
Maximum file size for uploads in bytes, default is 1MB, new in AOLserver 4.01
keepwait
Max time conn is kept alive (keepalive)
(set to 0 to disable keepalive)

Socket driver module (HTTPS) -- nsssl


port (HTTPS)
Port for HTTPS (typically 443)
hostname (HTTPS)
his is not the same as your hostname
address (HTTPS)
This is not the same as your host addr
keyfile
certfile

Control port -- nscp

port (NSCP)
Control port listens on port 9999
address (NSCP)
For security, use 127.0.0.1 only

Control port users

user
sample user="nsadmin", pw="x"

Access log -- nslog

file


formattedtime
true=common log format
logcombined
true==NCSA combined format
maxbackup
Max number to keep around when rolling
rollhour
Time to roll log
rolllog
Should we roll log?
rollonsignal
Roll log on SIGHUP


   #
   # CGI interface -- nscgi
   #
   # Note: CGI is *vastly* inferior to ADP's or even built-in Tcl libraries.
   #
   ns_section "ns/server/${servername}/module/nscgi"
   ns_param   debug           false     ;# Be chatty in log
   ns_param   gethostbyaddr   false     ;# Whether to do reverse DNS lookups
   ns_param   limit           0         ;# Max number of concurrent CGI processes
   ns_param   maxoutput       10240     ;# Max bytes allowed from external process
   ns_param   buffersize      8192      ;# Buffer output from external process
   ns_param   map  "GET /cgi /usr/local/cgi"        ;# Where your CGI executables live (GET)
   ns_param   map  "POST /cgi /usr/local/cgi"       ;# Where your CGI executables live (POST)
   
   # CGI environment variable handling -- See admin guide
   ns_param   systemenvironment false   ;# Copies environment from nsd start shell
   
   
   #
   # Access control (permissions) -- nsperm
   #
   ns_section "ns/server/${servername}/module/nsperm"
   
   #
   # Unix domain socket driver -- nsunix
   #
   ns_section "ns/server/${servername}/module/nsunix"
   ns_param   hostname        "host"    ;# Hostname used in response to client
   ns_param   port            "port"    ;# Port to listen on
   ns_param   socketfile      "path.name" ;# UNIX domain socket driver
   
   #
   # Virtual Hosting redirector -- nsvhr
   #
   ns_section "ns/server/${servername}/module/nsvhr"
   ns_param   busyurl         "url"     ;# Redirect here if back-end times out
   ns_param   errorurl        "url"     ;# Redirect here on proxy errors
   ns_param   method          "GET"     ;# Methods allowed to proxy
   ns_param   method          "POST"    ;# Methods allowed to proxy (can have >1)
   ns_param   timeout         30        ;# Timeout waiting for back-end
   
   # Register hosts to proxy
   ns_section "ns/server/${servername}/module/nsvhr/maps"
   ns_param   "www.tcpsocket.com"    "http://127.0.0.0:2000" ;# HTTP proxy
   ns_param   "www.domainsocket.com" "unix://somehost"       ;# Domain socket