From: Vlad S. <ser...@us...> - 2005-06-09 00:01:37
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv833 Modified Files: ChangeLog sample-config.tcl Log Message: added example of virtual hosting Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** ChangeLog 8 Jun 2005 20:28:51 -0000 1.91 --- ChangeLog 9 Jun 2005 00:01:22 -0000 1.92 *************** *** 1,4 **** --- 1,6 ---- 2005-06-08 Vlad Seryakov <ser...@us...> + * sample-config.tcl: added example of dynamic virtual hosting + * include/ns.h: * nsd/tclobjv.c: added Ns_ObjvByteArray function to Index: sample-config.tcl =================================================================== RCS file: /cvsroot/naviserver/naviserver/sample-config.tcl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sample-config.tcl 16 Feb 2005 16:45:43 -0000 1.2 --- sample-config.tcl 9 Jun 2005 00:01:22 -0000 1.3 *************** *** 61,65 **** set bindir [file dirname [ns_info nsd]] ! set pageroot ${homedir}/servers/${servername}/pages set directoryfile index.adp,index.html,index.htm,index.xhtml,index.xht --- 61,66 ---- set bindir [file dirname [ns_info nsd]] ! set serverdir ${homedir}/servers/${servername} ! set pageroot pages set directoryfile index.adp,index.html,index.htm,index.xhtml,index.xht *************** *** 157,161 **** ns_section "ns/server/${servername}" ns_param directoryfile $directoryfile ! ns_param pageroot $pageroot ns_param enabletclpages false ;# Parse *.tcl files in pageroot. # --- 158,162 ---- ns_section "ns/server/${servername}" ns_param directoryfile $directoryfile ! ns_param pageroot $serverdir/$pageroot ns_param enabletclpages false ;# Parse *.tcl files in pageroot. # *************** *** 196,200 **** # ADP special pages ! #ns_param errorpage ${pageroot}/errorpage.adp ;# ADP error page. --- 197,201 ---- # ADP special pages ! #ns_param errorpage ${serverdir}/${pageroot}/errorpage.adp ;# ADP error page. *************** *** 227,230 **** --- 228,236 ---- # # Parameters: + # + # serverdir Defines absolute path to server's home directory + # + # pageroot Defines absolute or relative to serverdir directory + # where all html/adp pages are located # # cache Boolean. Enable cache for normal URLs. *************** *** 252,256 **** # # ns_section "ns/server/${servername}/fastpath" ! # ns_param directorylisting fancy # # See also: --- 258,264 ---- # # ns_section "ns/server/${servername}/fastpath" ! # ns_param directorylisting fancy ! # ns_param serverdir ${serverdir} ! # ns_param pagedir ${pageroot} # # See also: *************** *** 286,293 **** 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 --- 294,301 ---- 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 *************** *** 327,340 **** # #ns_section "ns/server/${servername}/module/nscp" ! # ns_param address 127.0.0.1 ! # ns_param port 9999 ! # ns_param echopassword 1 ! # ns_param cpcmdlogging 1 # #ns_section "ns/server/${servername}/module/nscp/users" ! # ns_param user "nsadmin:t2GqvvaiIUbF2:" # #ns_section "ns/server/${servername}/modules" ! # ns_param nscp ${bindir}/nscp.so # --- 335,348 ---- # #ns_section "ns/server/${servername}/module/nscp" ! #ns_param address 127.0.0.1 ! #ns_param port 9999 ! #ns_param echopassword 1 ! #ns_param cpcmdlogging 1 # #ns_section "ns/server/${servername}/module/nscp/users" ! #ns_param user "nsadmin:t2GqvvaiIUbF2:" # #ns_section "ns/server/${servername}/modules" ! #ns_param nscp ${bindir}/nscp.so # *************** *** 352,367 **** # #ns_section "ns/modules" ! # ns_param nssock ${bindir}/nssock.so # #ns_section "ns/module/nssock" ! # ns_param port $httpport ! # ns_param hostname $hostname ! # ns_param address $address ! # ns_param defaultserver server1 # #ns_section "ns/module/nssock/servers" ! # ns_param server1 $hostname:$httpport # # --- 360,416 ---- # #ns_section "ns/modules" ! #ns_param nssock ${bindir}/nssock.so # #ns_section "ns/module/nssock" ! #ns_param port $httpport ! #ns_param hostname $hostname ! #ns_param address $address ! #ns_param defaultserver server1 # #ns_section "ns/module/nssock/servers" ! #ns_param server1 $hostname:$httpport # + # + # Example: Dynamic Host headers based virtual servers. + # + # To enable: + # + # 1. Enable by setting enabled to true. + # 2. For each hosted name create directory under ${serverdir} + # 3. Each virtual host directory should have ${pageroot} subdirectory + # + # /usr/local/ns/ + # servers/${servername} + # host.com/ + # pages + # domain.net/ + # pages + # + # + # Parameters: + # + # enabled Enable or disable virtual hosting + # hostprefix Prefix between serverdir and host name + # stripport Remove :port in the Host: header when + # building pageroot path so Host: www.host.com:80 + # will result in pageroot ${serverdir}/www.host.com + # stripwww Remove www. prefix from Host: header + # when building pageroot path so Host: www.host.com + # will result in pageroot ${serverdir}/host.com + # hosthashlevel Hash the leading characters of string into a path, skipping + # periods and slashes. If string contains less characters than + # levels requested, '_' characters are used as padding. + # For example, given the string 'foo' and the levels 2, 3: + # foo, 2 -> /f/o + # foo, 3 -> /f/o/o + # + + #ns_section "ns/server/${servername}/vhost" + #ns_param enabled true + #ns_param hostprefix "" + #ns_param hosthashlevel 0 + #ns_param stripport true + #ns_param stripwww true # *************** *** 411,417 **** # #ns_section ns/server/stats ! # ns_param enabled 1 ! # ns_param url /naviserver/stats ! # ns_param user nsadmin ! # ns_param password 23dfs!d # --- 460,466 ---- # #ns_section ns/server/stats ! #ns_param enabled 1 ! #ns_param url /naviserver/stats ! #ns_param user nsadmin ! #ns_param password 23dfs!d # |