1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
update the docs to include all of the options
--- a/dhttpd.1
+++ b/dhttpd.1
@@ -1,6 +1,6 @@
.TH DHTTPD 1
-.SH DHTTPD
-dhttpd \- Minimal Webserver without Cgi-bin support.
+.SH NAME
+dhttpd \- Minimal webserver without cgi-bin support.
.SH SYNOPSIS
.B dhttpd
.I "[options]"
@@ -13,13 +13,32 @@
and it was in working condition, it was realized that it was memory
efficient, low profile, quick, and served the one need for
an HTTP daemon: to transmit files.
+.SH FEATURES
+dhttpd does not support generating directory listings for you. for a
+directory, it will give the index.html, if it exists, or it will give
+an error.
+dhttpd doesn't support logging, cgi, or public_html directories. It's
+intended to be a very minimal web server.
.SH OPTIONS
.TP
-.B \-h
-Show summary of options.
-.TP
.B \-p portnum
Set the port the web server runs on
+.B http://servername/
+.TP
+.B \-r webdir
+Serve requests under this directory. The default location to serve files from is
+.B /var/www/.
+You will need an index.html if you want to be able to use exactly that location. If not, you have to enter the file name too.
+.TP
+.B \-b IP address
+Listen on specified interface. Defaults to 0.0.0.0 (all interfaces).
+.TP
+.B \-d
+Do not fork into background on startup.
+.TP
+.B \-h
+Show summary of options.
+
.SH AUTHOR
This manual page was written by Christoph Lameter <clameter@debian.org>,
for the Debian GNU/Linux system.
--- a/src/main.cc
+++ b/src/main.cc
@@ -120,8 +120,9 @@
printf( "usage: %s [options]\n", argv[ 0 ] );
printf( " -p (port) Use a different port than the default of %i\n", DEFAULTPORT );
printf( " -b Bind to this address instead of %s\n", DEFAULTBINDADDR);
- printf( " -h Help\n" );
+ printf( " -r Serve requests under this directory instead of %s\n", ROOT_DIR);
printf( " -d Do not fork into Background on startup\n" );
+ printf( " -h Help\n" );
return 0;
case 'p':
|