Conf/Examples/Servers

From AOLserver Wiki
Revision as of 20:58, 28 December 2011 by Bernhard (talk | contribs) (Created page with '= 2 Virtual Servers Configuration = part of AOLserver Config Examples This config provides 2 virtual servers listening on different ports. nssock is config…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

2 Virtual Servers Configuration

part of AOLserver Config Examples

This config provides 2 virtual servers listening on different ports.

nssock is configured independently under each virtual server.

Additional modules can be loaded and configured for each virtual server.

 # Global Parameters
 ns_section ns/parameters
 ns_param home /usr/lib/aolserver4
 ns_param serverlog /var/log/aolserver4/virtual-hosts.log
 ns_param pidfile /var/run/aolserver4/virtual-hosts.pid
 ns_section ns/servers
 ns_param   server1 "Website 1"
 ns_param   server2 "Website 2" 
 # virtual server 1 
 ns_section ns/server/server1
 ns_param   directoryfile   index.html
 ns_param   pageroot        /var/www/example1.com
 # modules for server1
 ns_section ns/server/server1/modules
 ns_param   nslog         nslog.so
 ns_param   nssock        nssock.so
 # Configure server1 nssock
 ns_section ns/server/server1/module/nssock
 ns_param   port            8001
 ns_param   address         0.0.0.0
 # Configure server1 accesslog
 ns_section ns/server/server1/module/nslog
 ns_param   file            /var/log/aolserver4/example1.com.access.log
 # virtual server2 
 ns_section ns/server/server2
 ns_param   directoryfile   index.html
 ns_param   pageroot        /var/www/example2.com
 ns_section ns/server/server2/modules
 ns_param   nslog         nslog.so
 ns_param   nssock        nssock.so
 ns_section ns/server/server2/module/nslog
 ns_param   file         /var/log/aolserver4/example2.com.access.log   
 ns_section ns/server/server2/module/nssock
 ns_param   port            8002
 ns_param   address         0.0.0.0