Conf/Examples/VirtualHosts

From AOLserver Wiki
Revision as of 15:22, 23 December 2011 by Visitatvishal (talk | contribs) (Created page with '= Virtual Hosts Configuration = part of AOLserver Config Examples # Configuration Variables set instance main set description "Main Aolserver Instance…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Virtual Hosts Configuration

part of AOLserver Config Examples

 # Configuration Variables
 set instance main
 set description "Main Aolserver Instance"
  
 #set domain localhost
 #set domain_description "local Website"
 set address 127.0.0.1
 set port 8000
 set debug false 
 set chroot true
 # empty home results in / as server home, which is
 # what we want after chroot-ing
 set home [expr {$chroot ? "" : "/var/lib/aolserver/$instance"}]
  
 # AOLserver configuration starts here, no user servicable parts inside
 ns_section ns/parameters
  
 # The following is not required, debugging defaults to false
 ns_param debug $debug
  
 ns_param home ${home}/
 ns_param servername $description
 ns_param user  www-data
 ns_param group www-data
 ns_param serverlog $home/log/error.log
 ns_param pidfile $home/log/pid
  
 ns_section ns/servers
 ns_param   www.vh1.com "first virtual host"
 ns_section ns/server/www.vh1.com
 ns_param   directoryfile   index.html
 ns_param   pageroot        /var/www/vh1/www
  
 ns_section ns/server/www.vh1.com/tcl
 ns_param   library 	/var/www/vh1/tcl
 ns_section ns/server/www.vh1.com/module/nssock
 ns_param   port            8000
 ns_param   hostname        www.vh1.com
 ns_param   address         127.0.0.1
  
 ns_section ns/server/www.vh1.com/module/nslog
 ns_param   file            /var/log/vh1/access.log
  
 ns_section ns/server/www.vh1.com/module/nscgi
 ns_param   map     "GET  /cgi-bin $home/cgi-bin"
 ns_param   map     "POST /cgi-bin $home/cgi-bin"
 ns_param   map     "GET /xx"
  
 ns_section "ns/server/www.vh1.com/modules"
 ns_param   nssock             nssock.so
 ns_param   nslog              nslog.so
 ns_param   nscgi              nscgi.so


 ns_section ns/servers
 ns_param   www.vh2.com "second virtual host"
 ns_section ns/server/www.vh2.com
 ns_param   directoryfile   index.html
 ns_param   pageroot        /var/www/vh2/www
  
 ns_section ns/server/www.vh2.com/tcl
 ns_param   library 	/var/www/vh2/tcl
 ns_section ns/server/www.vh2.com/module/nssock
 ns_param   port            8000
 ns_param   hostname        www.vh2.com
 ns_param   address         127.0.0.1
  
 ns_section ns/server/www.vh2.com/module/nslog
 ns_param   file            /var/log/vh2/access.log
  
 ns_section ns/server/www.vh2.com/module/nscgi
 ns_param   map     "GET  /cgi-bin $home/cgi-bin"
 ns_param   map     "POST /cgi-bin $home/cgi-bin"
 ns_param   map     "GET /xx"
  
 ns_section "ns/server/www.vh2.com/modules"
 ns_param   nssock             nssock.so
 ns_param   nslog              nslog.so
 ns_param   nscgi              nscgi.so


 ns_section ns/servers
 ns_param   www.vh3.com "third virtual host"
 ns_section ns/server/www.vh3.com
 ns_param   directoryfile   index.html
 ns_param   pageroot        /var/www/vh3/www
  
 ns_section ns/server/www.vh3.com/tcl
 ns_param   library 	/var/www/vh3/tcl
 ns_section ns/server/www.vh3.com/module/nssock
 ns_param   port            8000
 ns_param   hostname        www.vh3.com
 ns_param   address         127.0.0.1
  
 ns_section ns/server/www.vh3.com/module/nslog
 ns_param   file            /var/log/vh3/access.log
  
 ns_section ns/server/www.vh3.com/module/nscgi
 ns_param   map     "GET  /cgi-bin $home/cgi-bin"
 ns_param   map     "POST /cgi-bin $home/cgi-bin"
 ns_param   map     "GET /xx"
  
 ns_section "ns/server/www.vh3.com/modules"
 ns_param   nssock             nssock.so
 ns_param   nslog              nslog.so
 ns_param   nscgi              nscgi.so