![]() | Lesson 1: Server Setup |
13:13 PM Learn | Basic Setup | Templates | Server Security | Direct URLs | URL Domains
tclsh8.6 bin/httpd.tcl -debug 1This runs the server using a standard selection of features and displaying the documents stored under htdocs in the distribution. If you want an alternate document root, use the -docRoot directory command line option.
tclsh8.6 bin/httpd.tcl -docRoot directory
When you specify the -debug flag, you get additional information printed as different modules are loaded. You also get a Tcl command prompt that lets you poke around in the main Tcl interpreter used by TclHttpd.
Here are the command line options understood by this server:
| option | default | description |
|---|---|---|
| -virtual | paste.privyetmir.co.uk.tk /opt/tclhttpd/bin/rc-paste.privyetmir.co.uk {privyetmir.co.uk www.privyetmir.co.uk} /opt/tclhttpd/bin/rc-privyetmir.co.uk | Virtual host config list |
| -config | /opt/tclhttpd/bin/tclhttpd.rc | Configuration File |
| -main | /opt/tclhttpd/bin/httpdthread.tcl | Per-Thread Tcl script |
| -docRoot | /opt/tclhttpd/bin/../htdocs | Root directory for documents |
| -port | 8015 | Port number server is to listen on |
| -host | www.patthoyts.tk | Server name, should be fully qualified |
| -ipaddr | Interface server should bind to | |
| -ip6addr | IPv6 Interface server should bind to | |
| -https_port | 8016 | SSL Port number |
| -https_host | www.patthoyts.tk | SSL Server name, should be fully qualified |
| -https_ipaddr | Interface SSL server should bind to | |
| -webmaster | patthoyts@users.sourceforge.net | E-mail address for errors |
| -uid | 33 | User Id that server runs under |
| -gid | 33 | Group Id for caching templates |
| -secs | 60 | Seconds per "minute" for time-based histograms |
| -threads | 4 | Number of worker threads (zero for non-threaded) |
| -library | /opt/tclhttpd/bin/../custom | Directory list where custom packages and auto loads are |
| -debug | 0 | If true, start interactive command loop |
| -compat | 3.3 | version compatibility to maintain |
| -gui | 1 | flag for launching the user interface |
| mail.patthoyts.tk | Mail Servers for sending email from tclhttpd | |
| -daemon | 0 | Run in the background as a daemon process. Requires the 'Expect' package. |
The sampleapp directory of the distribution contains several examples contributed by TclHttpd users.
| Home | Status | Learn | CGI Tests | Templates | Access Control | Reference Manual |