• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bin/H03-May-2022-2,7911,943

certs/H28-May-2004-123103

config/H03-May-2022-5,9685,268

contrib/cookies/H28-May-2004-5431

custom/H28-May-2004-371239

debian/H28-May-2004-868528

doc/H28-May-2004-176160

htaccess/H28-May-2004-3125

htdocs/H03-May-2022-15,12211,320

htdocs_2/H28-May-2004-1814

lib/H03-May-2022-13,9007,777

sampleapp/H28-May-2004-6,0443,891

src/H03-May-2022-2,3121,526

ChangeLogH A D28-May-200451.4 KiB1,2721,034

INSTALLH A D05-May-20046.1 KiB146111

Makefile.inH A D03-May-202215.4 KiB429242

READMEH A D19-May-20046.3 KiB169126

README.virthostH A D19-Aug-20022.2 KiB4738

VERSIONH A D19-May-2004983 2826

WHATSNEWH A D23-Mar-20045.8 KiB145117

aclocal.m4H A D11-Feb-200031 21

changesH A D04-Aug-200218.6 KiB553375

configureH A D03-May-202268.3 KiB2,2791,662

configure.inH A D19-May-200412 KiB349280

crypt_pkgIndex.tcl.inH A D20-Apr-2000561 1210

license.termsH A D31-Aug-20022.1 KiB4135

limit_pkgIndex.tcl.inH A D20-Apr-2000561 1210

tclhttpd.specH A D28-May-2004762 3729

README

1This HTTPD is written in Tcl and Tk.
2Written by Stephen Uhler and Brent Welch of Sun Microsystems Laboratory.
3Brent is now at Panasas, Inc.
4See the file "license.terms" for information on usage and redistribution
5of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
7Version: 3.5.1
8Tue May 18 21:15:39 PDT 2004
9
10STARKIT QUICK START
11
12tclkit tclhttpd3.5.1.kit -port 80 -docRoot htmldir -library tcldir
13
14The server loads all the tcl sources in the library.  Try also
15tclkit tclhttpd3.5.1.kit -help
16
17STANDARD QUICK START
18
19It requires Tcl 8.3 (or higher) and the Standard Tcl Library.
20This uses the cmdline, base64, ncgi, html, and counter
21modules of the Standard Tcl Library. If you must, you
22can probably get by with Tcl 8.0 or later if you install
23the Standard Tcl Library.
24
25The Web server runs under either tclsh or wish.
26With wish you get a simple GUI that shows some counters.
27
28For a quick test that runs a server on port 8015, do
29UNIX:
30
311) Test preconditions
32	Tcl interpreter: tclsh8.3, tclsh8.4, tclsh8.5, or tclkit (or wish)
33        tcllib 1.3 or higher
34Try
35        tclsh (whatever version)
36	package require counter
37
382) If you can do the above, then you should be able to run the
39server directly from this distribution directory without bothering
40to configure, make, and install it. e.g.,
41
42	tclsh8.4 bin/httpd.tcl -debug 1
43Windows and Macintosh:
44	Run wish or tclsh and source bin/httpd.tcl
45
463) For more detailed installation instructions, see the INSTALL file.
47
48For a complete set of command line options, do
49httpd.tcl -help
50This lets you set basic parameters like port number and server name.
51
52VERSION SUMMARY
53
54Version 3.5 has various bug fixes, improvements to the docs, and
55some sample applications.  3.5.1 adds a mail client module.
56
57Version 3.4.3  fixes loading code from the custom code directory,
58which broke in 3.4.2
59
60Version 3.4.2 has bug fixes in the directory listing code (dirlist.tcl).
61Prevent listing of directory trees outside the URL tree, and get them to work
62at all.  Added a fix in upload.tcl so that extra post data is cleaned up
63correctly - fixes bugs that occur when GET and POST uploads are mixed.
64Minor cleanup to the sample htdocs tree.
65
66Version 3.4.1 fixes CGI POST forms on Windows, a typo in upload.tcl
67and the lib/pkgIndex.tcl.  It also disallows the ability to retrieve
68.tml, .tclaccess, and .htaccess files.  These simple new APIs crept in:
69  Url_AccessInstallPrepend, Url_AccessUnInstall
70  Mtype_Add, Mtype_Reset
71  Direct_UrlRemove
72
73Version 3.4 has several updates to the Doc, Upload, and Thread modules
74done by Melissa Chawla of Panasas. Please see the ChangeLog for details.
75There is also a small modification to support If-Modified-Since optimization
76in Httpd_ReturnFile contributed by Brian Meagher.  Don Porter contributed
77virtual host support, so you can support several sites with one server.
78Please see README.virthost for details
79
80Version 3.3.1 was just a cleanup of the installation files and
81configure scripts. (acruz)
82
83Version 3.3 fixes more bugs in CGI handling and
84adds a simple file upload domain handler.
85
86Version 3.2.1 fixes bugs in CGI handling related to the changes
87in 3.2 in the way POST data is handled.
88
89Version 3.2 changes the way you customize a TclHttpd installation with
90the goal of not having to modify the bin/httpd.tcl and bin/httpdthread.tcl
91scripts, although in some cases this will still be necessary.  A new
92"custom code" directory is supported and the server will load all the
93code from that directory during startup.  Specify this with the -library
94command line option or the "library" Config specification in your .rc file.
95
96Version 3.1.0 renames all the packages to be httpd::foo instead of just
97foo, so that the package namespace is a bit more organized when TclHttpd
98is installed along with the rest of Tcl and Tk.  Other that that,
99it is essentially identical with 3.0.4.
100
101Version 3.0.4 fixes yet-another bug with Doc_AddRoot.
102
103Version 3.0.3 fixes another bug with Doc_AddRoot, and fixes the
104bundled distribution so you can use the Thread extension again.
105
106Version 3.0.2 fixes a serious SECURITY BUG that let 3.0.0 and 3.0.1
107serve up any old file on your system.  That bug was not present in earlier
108versions of the server.
109
110Version 3.0.1 has minor bug fixes and (hopefully) some improvements
111in the bundled distribution.
112
113Version 3.0.0 has three major changes:
114* Use of Standard Tcl Library modules.  The server looks around for the
115tcllib distribution and automatically uses it.  One goal of this conversion
116is to eliminate the use of the page global array and replace that with
117calls to the ncgi module.
118* Support for threads.  If you configure and build Tclsh with --enable-threads
119and you have the Thread extension available, the the server can
120use threads to service requests.
121* Support for SSL.  If you have the "tls" extension installed, then you can
122start an SSL server by giving the -https_port command line argument.
123
124Version 2.3.6 is the last in the 2.3 series.  It has a few minor
125bug fixes.  The next release, 3.0, will support threading using
126the Thread extension and SSL using the TLS extension.
127
128Version 2.3 changes the way post data is  handled.
129The various point releases (e.g., 2.3.4) fix important
130bugs in cookie handling and the new post data handler.
131
132Version 2.1.6 introduces a configuration file, tclhttpd.rc
133You can edit this to tune the set of modules used by the server,
134or to hardwire the port, etc.
135
136If you have Scotty installed, then you can try out the SNMP demo.
137You'll need to arrange to have the Tnm*.so library on the
138auto_path for your shell.  I have found that 2.1.5 works
139with 8.0a2, but not with 8.0b1 because Tcl_GetFile has gone.
140
141MAILING LISTS
142
143There is a mailing list for users of the Tcl web server at
144SourceForge as part of the tclhttpd project.  Please sign
145up via the web site at www.sourceforge.net/projects/tclhttpd.
146If that is dead, send email to
147welch@acm.org
148to find out the current location of the mailing list
149
150Send messages for the list to
151tclhttpd-users@lists.sourceforge.net
152
153Bugs and comments to the mailing list, or to <welch@acm.org>
154Put "httpd" in the subject of the mail so I can sort it automatically.
155
156WWW
157
158The current URL for the distribution can be found in
159ftp://www.tcl.tk/pub/tcl/httpd/
160
161There is documentation at
162http://www.beedub.com/tclhttpd/
163http://www.tcl.tk/software/tclhttpd/
164
165SourceForge
166
167http://www.sourceforge.net/projects/tclhttpd
168http://tclhttpd.sourceforge.net/
169

README.virthost

1Each tclhttpd process is configured by a configuration file, usually
2designated with the -config command line option.  The virtual host
3patch creates another configurable option to appear in that file:
4
5Config virtual [list $hostNameList1 $configFile1 \
6		     $hostNameList2 $configFile2 ...]
7
8A slave interp will be created for each $hostNameList, and in that slave
9another complete copy of the tclhttpd packages will be loaded according
10to the configuration specified in the corresponding $configFile.  All
11the host names in the $hostNameList will be associated with that slave
12interp; a request for any host in the $hostNameList will be handled by
13the corresponding slave interp.
14
15An example configuration line might be:
16
17Config virtual	{ dev.example.com 		dev.rc
18		 {example.com www.example.com}	users.rc
19		}
20
21Here example.com and www.example.com are multiple names for "the same"
22site, and that sameness includes sharing the Tcl interp that handles
23requests.  This can be important depending on how the site makes use
24of the interp.
25
26From the perspective of the creator of the virtual site, nothing changes,
27they still create a $configFile to set up their site and interface it
28with whatever components they are using to build their site.  Their
29interface code is still running in a Tcl interp; the fact that it's a
30slave interp makes no difference.
31
32The actual mechanism is that the master interp accepts all socket
33connections.  When the Host: header on the request is received, the
34connection gets passed to the appropriate slave interp for further
35handling.  If there is no Host: header (really ancient clients?) or if
36the Host: value is not one of those specified in the [Config virtual]
37argument, then the master interp handles the request according to
38whatever additional configuration details are found in the master
39configuration file.  In a sense, every IP address served by tclhttpd
40has a "default" site determined by the master config file.
41
42The configuration values used in the slave interp are first inherited
43from the master.  In the $configFile, you only need to specify those
44values that distinguish the virtual site from the default site.  In my
45experience that usually includes the following [Config] options:
46docRoot, main, webmaster, and LogFile.
47