Made a patch so I donot have to hack  every time the addRoot stuff in
tclhttpd.tcl but give it as an argument to httpd.tcl

or

by add a few lines in tclhttpd.rc

Config addRoot  {
 /ssu     /usr/local/www/docs/ssu   1
 /extdocs /usr/local/www/docs/extdocs 1
 /sxcdocs /usr/local/www/docs/sxcdocs 1
 /htdig   /usr/local/www/docs/htdig 1
 /cgi-don-libes /usr/local/www/docs/cgi-don-libes 1
 /nk2000        /usr/local/www/docs/nk2000 1
 /toolbox       /usr/local/www/docs/toolbox12 1
}


A cleaner hack for hdocs_2 !!

An example call (piet + my.rc) + the following sources are changed to
support this feature:
httpd.tcl
httpdthread.tcl
tclhttpd.rc

These sources are deltas to tclhttpd3.1.0

--
#-------With best regards,    Mit freundlichen Gruessen,    Met
vriendelijke groet,  ------
# Piet Vloet
# Siemens AG Austria
# Boschstrasse 10       Phone : +43-51707-42906
# A-1190 Vienna         Fax   : +43-51707-52606
# mailto:[EMAIL PROTECTED]
WWW:http://www.siemens.at

httpd.tcl

httpdthread.tcl

# tclhttpd.rc
#
# This is the default configuration file for TclHttpd
#
# Note - you should assume that all the paramters listed here 
# are required in one place or another.  If you want to "delete"
# a parameter you should set the associated value to the
# empty string, which is written either "" or {}
#
# This file is processed in a safe interpreter.  The only side
# effects it has are through the Config command.  Given two arguments,
# the Config command sets a parameter.  With a single argument,
# it returns the value of that parameter.

# Config parameters in all lower-case have a command line
# argument alternative (see httpd.tcl)
# You can specify a value on the command line to override
# what is in this configuration file.

# docRoot - the name of the file system directory containing
# the root of your document tree.  This is conditional so you
# can run from the source distribution or after doing "make install"

foreach d [list \
        [file join [Config home] ../htdocs] \
        [file join [Config home] ../tclhttpd/htdocs]] {
    if {[file isdirectory $d]} {
        Config docRoot $d
    }
}

# addRoot - Offers you the possibility to define additional URL subtrees.
# This is conditional.
# This mechanism maps the file system "directory" into the URL starting at virtual.
# The last parameter has to be defined as True if the document handlers should run in 
a thread
 
#Config addRoot  {
#  /virtual     /directory   1
#}

# uid - the server executes as the following user ID.
# If you have TclX available, these can be user names.
# If you use the simple "setuid" extension, this must be a number.

Config uid              50

# gid - the server executes as the following group ID.
# If you are using .tml templates then the server will try
# to cache corresponding .html files.  Put the server into
# the group that has write permission to the htdocs area
# so it can do this.  If it cannot write the cache files it
# just has to process the template on every URL request.

Config gid              50

# host - the name of the server (i.e., www.yourcompany.com)
# This should be fully qualified.

Config host             [info hostname]

# https_host - the name of the server (i.e., www.yourcompany.com)
# This should be fully qualified.

Config https_host       [info hostname]

# port - the listening port for the server for HTTP requests.
# The standard web port is 80.

Config port             8015

# https_port - the listening port for the server for HTTPS requests.
# The standard SSL port is 443.

Config https_port       8016

# ipaddr - the IP address of the server's end of the HTTP socket.
# Only specify this if you have a machine with several IP addresses
# and you want the server to only listen on one IP address.
# If this is the empty string, then it will listen on all
# network interfaces for connections.

Config ipaddr   {}

# https_ipaddr - ditto, but for https (i.e., SSL) connections

Config https_ipaddr     {}

# webmaster - an email address for error mailings

Config webmaster        webmaster@[info hostname]

# library - additional directory to add to the auto_path
# If you add custom code to the server, put it in this directory.

Config library          [file join [Config docRoot] libtml]

# main - Main per-thread startup script.

Config main             [file join [Config home] httpdthread.tcl]

# threads - the maximum number of worker threads to create.
# If 0, then no threads are ever used.

Config threads          0

#####################

# The parameters below here are not settable via the command line

# LogFile - the file used for standard logging informaation.
# This is actually the prefix of the name.  The current date stamp
# is append to this file, and it is rolled every night at midnight

Config LogFile  [file join /tmp log[Config port]_ ]

# LogFlushMinutes - how frequently the log file is flushed to disk.
# Use 0 to have each URL request cause a log flush.

Config LogFlushMinutes 1

# MaxFileDescriptors - the maximum number of file descriptors the
# server can have open.  This impacts the number of simultaneous
# client requests it can have open.

Config MaxFileDescriptors       256

#########################
# SSL Configuration

# SSL_REQUEST - should the server ask for certificates from clients?

Config SSL_REQUEST      0

# SSL_REQUIRE - should the server require certificates?

Config SSL_REQUIRE      0

# SSL_CADIR - the directory containing Certificate Authority
# certificate files.  If you have only one such file, you can use
# SSL_CAFILE described below.

Config SSL_CADIR        [file join [file dirname [Config home]] certs]

# SSL_CAFILE - the file containing the Certificate Authority
# certificate.  If this is empty, then the directory specified by
# SSL_CADIR is scanned for certificate files.

Config SSL_CAFILE       ""

# SSL_CERTFILE - The server's certificate.

Config SSL_CERTFILE     [file join [Config SSL_CADIR] server.pem]

# SSL_KEYFILE - The server's key file.  If this is empty,
# then just use the SSL_CERTFILE

Config SSL_KEYFILE      [file join [Config SSL_CADIR] skey.pem]

# USE_SSL2 - Allow the use of SSL version 2 
# (You cannot get this with a "no patents" build of OpenSSL)

Config USE_SSL2         1

# USE_SSL3 - Allow the use of SSL version 3

Config USE_SSL3         1

# USE_TLS1 - ??

Config USE_TLS1         0

# SSL_CIPHERS - list of SSL ciphers to support.  If this is empty,
# then all the ciphers supported by the SSL implementation are available.

Config SSL_CIPHERS      {}

# tclhttpd.rc
#
# This is the default configuration file for TclHttpd
#
# Note - you should assume that all the paramters listed here 
# are required in one place or another.  If you want to "delete"
# a parameter you should set the associated value to the
# empty string, which is written either "" or {}
#
# This file is processed in a safe interpreter.  The only side
# effects it has are through the Config command.  Given two arguments,
# the Config command sets a parameter.  With a single argument,
# it returns the value of that parameter.

# Config parameters in all lower-case have a command line
# argument alternative (see httpd.tcl)
# You can specify a value on the command line to override
# what is in this configuration file.

# docRoot - the name of the file system directory containing
# the root of your document tree.  This is conditional so you
# can run from the source distribution or after doing "make install"

foreach d [list \
        [file join [Config home] ../htdocs] \
        [file join [Config home] ../tclhttpd/htdocs]] {
    if {[file isdirectory $d]} {
        Config docRoot $d
    }
}

#
#
#

Config addRoot  {
 /ssu     /usr/local/www/docs/ssu   1
 /extdocs /usr/local/www/docs/extdocs 1
 /sxcdocs /usr/local/www/docs/sxcdocs 1
 /htdig   /usr/local/www/docs/htdig 1
 /cgi-don-libes /usr/local/www/docs/cgi-don-libes 1
 /nk2000        /usr/local/www/docs/nk2000 1
 /toolbox       /usr/local/www/docs/toolbox12 1
}

# uid - the server executes as the following user ID.
# If you have TclX available, these can be user names.
# If you use the simple "setuid" extension, this must be a number.

Config uid              595

# gid - the server executes as the following group ID.
# If you are using .tml templates then the server will try
# to cache corresponding .html files.  Put the server into
# the group that has write permission to the htdocs area
# so it can do this.  If it cannot write the cache files it
# just has to process the template on every URL request.

Config gid              50

# host - the name of the server (i.e., www.yourcompany.com)
# This should be fully qualified.

Config host             [info hostname]

# https_host - the name of the server (i.e., www.yourcompany.com)
# This should be fully qualified.

Config https_host       [info hostname]

# port - the listening port for the server for HTTP requests.
# The standard web port is 80.

Config port             8015

# https_port - the listening port for the server for HTTPS requests.
# The standard SSL port is 443.

Config https_port       8016

# ipaddr - the IP address of the server's end of the HTTP socket.
# Only specify this if you have a machine with several IP addresses
# and you want the server to only listen on one IP address.
# If this is the empty string, then it will listen on all
# network interfaces for connections.

Config ipaddr   {}

# https_ipaddr - ditto, but for https (i.e., SSL) connections

Config https_ipaddr     {}

# webmaster - an email address for error mailings

Config webmaster        [EMAIL PROTECTED]

# library - additional directory to add to the auto_path
# If you add custom code to the server, put it in this directory.

Config library          [file join [Config docRoot] libtml]

# main - Main per-thread startup script.

Config main             [file join [Config home] httpdthread.tcl]

# threads - the maximum number of worker threads to create.
# If 0, then no threads are ever used.

Config threads          0

#####################

# The parameters below here are not settable via the command line

# LogFile - the file used for standard logging informaation.
# This is actually the prefix of the name.  The current date stamp
# is append to this file, and it is rolled every night at midnight

Config LogFile  [file join /tmp log[Config port]_ ]

# LogFlushMinutes - how frequently the log file is flushed to disk.
# Use 0 to have each URL request cause a log flush.

Config LogFlushMinutes 1

# MaxFileDescriptors - the maximum number of file descriptors the
# server can have open.  This impacts the number of simultaneous
# client requests it can have open.

Config MaxFileDescriptors       256

#########################
# SSL Configuration

# SSL_REQUEST - should the server ask for certificates from clients?

Config SSL_REQUEST      0

# SSL_REQUIRE - should the server require certificates?

Config SSL_REQUIRE      0

# SSL_CADIR - the directory containing Certificate Authority
# certificate files.  If you have only one such file, you can use
# SSL_CAFILE described below.

Config SSL_CADIR        [file join [file dirname [Config home]] certs]

# SSL_CAFILE - the file containing the Certificate Authority
# certificate.  If this is empty, then the directory specified by
# SSL_CADIR is scanned for certificate files.

Config SSL_CAFILE       ""

# SSL_CERTFILE - The server's certificate.

Config SSL_CERTFILE     [file join [Config SSL_CADIR] server.pem]

# SSL_KEYFILE - The server's key file.  If this is empty,
# then just use the SSL_CERTFILE

Config SSL_KEYFILE      [file join [Config SSL_CADIR] skey.pem]

# USE_SSL2 - Allow the use of SSL version 2 
# (You cannot get this with a "no patents" build of OpenSSL)

Config USE_SSL2         1

# USE_SSL3 - Allow the use of SSL version 3

Config USE_SSL3         1

# USE_TLS1 - ??

Config USE_TLS1         0

# SSL_CIPHERS - list of SSL ciphers to support.  If this is empty,
# then all the ciphers supported by the SSL implementation are available.

Config SSL_CIPHERS      {}

#!/bin/csh 
# TCLHTTPD VERSION: 3.0.2
#setenv TCL_HTTPD_LIBRARY /usr/local/www/lib/tclhttpd3.0.0

set ROOT=/usr/local/www/server310

${ROOT}/bin/httpd.tcl -docRoot /usr/local/www/docs/htdocs -addRoot " /ssu     
/usr/local/www/docs/ssu   1 \
 /extdocs /usr/local/www/docs/extdocs 1 \
 /sxcdocs /usr/local/www/docs/sxcdocs 1 \
 /htdig   /usr/local/www/docs/htdig 1 \
 /cgi-don-libes /usr/local/www/docs/cgi-don-libes 1 \
 /nk2000        /usr/local/www/docs/nk2000 1 \
 /toolbox       /usr/local/www/docs/toolbox12 1 \
" -library ${ROOT}/lib -webmaster [EMAIL PROTECTED] &

# TCLHTTPD VERSION 2.3.7
#/usr/local/www/tclhttpd2.3.7/bin/httpd.tcl -docRoot /usr/local/www/docs/htdocs 
-config /usr/local/www/config/tclhttpd2.rc &

Reply via email to