~ubuntu-branches/ubuntu/wily/micro-httpd/wily

« back to all changes in this revision

Viewing changes to debian/micro-httpd.8.pod

  • Committer: Bazaar Package Importer
  • Author(s): Jari Aalto
  • Date: 2008-10-26 12:14:05 UTC
  • Revision ID: james.westby@ubuntu.com-20081026121405-beigvqqekry9yvoi
Tags: 20051212-10
* debian/README.Debian-source:
  - New file. Epxlain debian/*.8.
* debian/*.8
  - New file generated form *.8.pod. Original manual page is no longer
    used.
* debian/control:
  - (Description): Make more compact.
  - (Depends): Add alternatives 'micro-inetd | netcat-traditional'
    Closes: #482082. Remove unused ${misc:Depends}.
  - (Homepage): New field.
  - (Standards-Version): Update to 3.8.0.
  - (Suggests): move micro-inetd to 'Depends:' alternatives.
  - (Vcs-*): Add new fields.
* debian/micro-httpd.{postinst,prerm}:
  - Check if update-inetd command exists (superserver is not requirement).
  - Set PATH.
  - (IsInetd): New.
  - (MainInetd): New.
* debian/rules:
  - (man): New target.
  - (install): Adjust install calls
  - (binary-arch): Install manual page form debian/*.8
* debian/debian-vars.mk
  - New file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#  This is manual page in Perl POD format. Read more at
 
2
#  http://perldoc.perl.org/perlpod.html or run command:
 
3
#
 
4
#     perldoc perlpod | less
 
5
#
 
6
#  To check the syntax:
 
7
#
 
8
#     podchecker *.pod
 
9
#
 
10
#  Create manual page with command:
 
11
#
 
12
#    pod2man PAGE.N.pod > PAGE.N
 
13
 
 
14
=pod
 
15
 
 
16
=head1 NAME
 
17
 
 
18
micro-httpd - really small HTTP server
 
19
 
 
20
=head1 SYNOPSIS
 
21
 
 
22
  micro-httpd DIRECTORY
 
23
 
 
24
=head1 OPTIONS
 
25
 
 
26
None.
 
27
 
 
28
=head1 DESCRIPTION
 
29
 
 
30
micro-httpd is a very small HTTP server all in 150 lines of code. It
 
31
runs from inetd, which means its performance is poor. But for
 
32
low-traffic sites, it is quite adequate. It implements all the basic
 
33
features of an HTTP server, including:
 
34
 
 
35
    *  Security against ".." filename snooping.
 
36
    *  The common MIME types.
 
37
    *  Trailing-slash redirection.
 
38
    *  index.html
 
39
    *  Directory listings.
 
40
 
 
41
To install it, add a line like this to /etc/inetd.conf:
 
42
 
 
43
    micro-http  stream tcp nowait nobody \
 
44
       /usr/sbin/micro-httpd micro-httpd dir
 
45
 
 
46
Make sure the path to the executable is correct, and change "dir" to
 
47
be the directory you want to serve. You could add line like this to
 
48
/etc/services:
 
49
 
 
50
    micro-http   port/tcp   #Micro HTTP server
 
51
 
 
52
Change "port" to the port number you want to use: 80, 8000, whatever.
 
53
Restart inetd by sending it a "HUP" signal.
 
54
 
 
55
On some systems, inetd has a maximum spawn rate - if you try to run
 
56
inetd services faster than a certain number of times per minute, it
 
57
assumed there is either a bug of an attack going on and it shuts down
 
58
for a few minutes. If you run into this problem - look for syslog
 
59
messages about too-rapid looping - you will need to find out how to
 
60
increase the limit. Unfortunately this varies from OS to OS. On
 
61
FreeBSD, you add a "-R 10000" flag to inetd's initial command line. On
 
62
some Linux systems, you can set the limit on a per-service basis in
 
63
inetd.conf, by changing "nowait" to "nowait.10000".
 
64
 
 
65
Note that you can use micro-httpd to serve HTTPS, if you like, by
 
66
running it from stunnel. First fetch and install stunnel - FreeBSD
 
67
users can just go to /usr/ports/security/stunnel and do a "make cert ;
 
68
make install". Then as root run:
 
69
 
 
70
    stunnel -p /usr/local/certs/stunnel.pem -d 443 -l \
 
71
       /usr/sbin/micro-httpd --  micro-httpd dir
 
72
 
 
73
Make sure the paths to the certificate and executable are correct, and
 
74
again don not forget to change "dir" to the directory you want to
 
75
serve.
 
76
 
 
77
 
 
78
=head1 ENVIRONMENT
 
79
 
 
80
None.
 
81
 
 
82
=head1 FILES
 
83
 
 
84
None.
 
85
 
 
86
=head1 SEE ALSO
 
87
 
 
88
inetd(8)
 
89
micro-inetd(8)
 
90
xinetd(8)
 
91
 
 
92
=head1 AUTHORS
 
93
 
 
94
Copyright (C) 1999 Jef Poskanzer <jef@mail.acme.com>. All rights
 
95
reserved.
 
96
 
 
97
This manual page was updated by Jari Aalto <jari.aalto@cante.net>.
 
98
Released under license GNU GPL v2 or (at your option) any later
 
99
version. For more information about license, visit
 
100
<http://www.gnu.org/copyleft/gpl.html>.
 
101
 
 
102
=cut