webfsd(1)						webfsd(1)


NAME
       webfsd - a lightweight http server

SYNOPSIS
       webfsd [ options ]

DESCRIPTION
       This  is	 a  simple http server for purely static content.
       You can use it to serve the content of a	 ftp  server  via
       http  for  example.   It is also nice to export some files
       the quick way by starting a http server in a few	 seconds,
       without editing some config file first.

OPTIONS
       -h     print  a short help text and the default values for
	      all options.

       -d     enable debug output.

       -s     Write a start/stop notice and serious errors to the
	      syslog.  Specify this option twice to get a verbose
	      log (additional log  events  like	 dropped  connec-
	      tions).

       -t sec set network timeout to >sec< seconds.

       -c n   set  the	number of allowed parallel connections to
	      >n<.  This is a per-thread limit.

       -a n   configure the size of the directory  cache.   webfs
	      caches  has  a  cache  for directory listings.  The
	      directory will be reread if the cached copy is more
	      than  one hour old or if the mtime of the directory
	      has changed.  The mtime will be updated if  a  file
	      is created or deleted.  It will not be updated if a
	      file is only modified, so you  might  get	 outdated
	      time stamps and file sizes.

       -y n   set  the	number	of  threads to spawn (if compiled
	      with thread support).

       -p port
	      listen on port >port< for incoming connections.

       -r dir set document root to >dir<.

       -R dir set document root to  >dir<  and	chroot	to  >dir<
	      before start serving files.  Note that this affects
	      the path for the access log file too.

       -f file
	      Use >file< as index file	for  directories.   If	a
	      client  asks for a directory, it will get >file< as
	      response if such a file exists in the directory and
	      a	 directory  listing  otherwise.	  index.html is a
	      frequently used filename.

       -n hostname
	      set  the	hostname  which	 the  server  should  use
	      (required for redirects).

       -i ip  bind to IP-address >ip<.

       -l log log  all	requests to the logfile >log< (common log
	      format).	Using "-" as filename makes webfsd  print
	      the  access  log	to  stdout,  which is only useful
	      together with the -F switch (see below).

       -L log same as above, but  additional  flush  every  line.
	      Useful  if  you  want monitor the logfile with tail
	      -f.

       -m file
	      read  mime   types   from	  >file<.    Default   is
	      /etc/mime.types.

       -u user
	      set  uid to >user< (after binding to the tcp port).
	      This option is allowed for root only.

       -g group
	      set gid to >group< (after binding to the tcp port).
	      This option is allowed for root only.

       -F     don't  run  as  daemon.	webfsd will not fork into
	      background, not detach  from  terminal  and  report
	      errors to stderr.

       -b user:pass
	      Set  user+password  for the exported files.  Only a
	      single username/password combination for all  files
	      is supported.

       -v     Enable  virtual  hosts.	This  has the effect that
	      webfsd expects directories with the hostnames (low-
	      ercase)  under document root.  If started this way:
	      "webfsd -v -r /home/web", it will look for the file
	      /home/web/ftp.foobar.org/path/file  when	asked for
	      http://ftp.FOObar.org:8000/path/file.

AUTHOR
       Gerd Knorr <kraxel@goldbach.in-berlin.de>
       FreeBSD port by Charles F. Randall <cfr@pobox.com>

COPYRIGHT
       Copyright (C) 1999,2000	Gerd  Knorr  <kraxel@goldbach.in-
       berlin.de>

(c) 1999 Gerd Knorr





webfsd(1)						webfsd(1)


       This  program  is  free	software; you can redistribute it
       and/or modify it under the terms of the GNU General Public
       License	as  published  by  the	Free Software Foundation;
       either version 2 of the License, or (at your  option)  any
       later version.

       This  program  is  distributed in the hope that it will be
       useful, but WITHOUT ANY WARRANTY; without even the implied
       warranty	 of  MERCHANTABILITY  or FITNESS FOR A PARTICULAR
       PURPOSE.	 See the GNU  General  Public  License	for  more
       details.

       You  should have received a copy of the GNU General Public
       License along with this program; if not, write to the Free
       Software	 Foundation,  Inc.,  675  Mass Ave, Cambridge, MA
       02139, USA.









































		       (c) 1999 Gerd Knorr			3


