version 1.2, 2007/10/16 01:29:44 |
version 1.2.4.1, 2008/03/24 07:14:46 |
|
|
.\" $eterna: bozohttpd.8,v 1.74 2006/05/17 08:19:10 mrg Exp $ |
.\" $NetBSD$ |
.\" |
.\" |
.\" Copyright (c) 1997-2006 Matthew R. Green |
.\" $eterna: bozohttpd.8,v 1.78 2008/03/03 03:36:11 mrg Exp $ |
|
.\" |
|
.\" Copyright (c) 1997-2008 Matthew R. Green |
.\" All rights reserved. |
.\" All rights reserved. |
.\" |
.\" |
.\" Redistribution and use in source and binary forms, with or without |
.\" Redistribution and use in source and binary forms, with or without |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
.\" SUCH DAMAGE. |
.\" SUCH DAMAGE. |
.\" |
.\" |
.Dd March 22, 2005 |
.Dd March 3, 2008 |
.Dt BOZOHTTPD 8 |
.Dt HTTPD 8 |
.Os BOZOS |
|
.Sh NAME |
.Sh NAME |
.Nm bozohttpd |
.Nm httpd |
.Nd hyper text transfer protocol version 1.1 daemon |
.Nd hyper text transfer protocol version 1.1 daemon |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm |
.Nm |
Line 76 This option enables daemon mode, where |
|
Line 77 This option enables daemon mode, where |
|
detaches from the current terminal, running in the background and |
detaches from the current terminal, running in the background and |
servicing HTTP requests. |
servicing HTTP requests. |
.It Fl C Ar suffix cgihandler |
.It Fl C Ar suffix cgihandler |
This option adds a new CGI handler program for a particularly file type. |
This option adds a new CGI handler program for a particular file type. |
The |
The |
.Ar suffix |
.Ar suffix |
should be any normal file suffix, and the |
should be any normal file suffix, and the |
|
|
.Ar index . |
.Ar index . |
.It Fl Z Ar certificate_path privatekey_path |
.It Fl Z Ar certificate_path privatekey_path |
This option sets the path to the server certificate file and the private key file |
This option sets the path to the server certificate file and the private key file |
in pem format. It also causes bozohttpd to start SSL mode. |
in pem format. It also causes |
|
.Nm |
|
to start SSL mode. |
.El |
.El |
.Pp |
.Pp |
Note that in |
Note that in |
|
|
.Xr inetd.conf 5 |
.Xr inetd.conf 5 |
entry would be: |
entry would be: |
.Bd -literal |
.Bd -literal |
www stream tcp nowait:600 httpd /usr/pkg/libexec/bozohttpd bozohttpd /var/www |
http stream tcp nowait:600 _httpd /usr/libexec/httpd httpd /var/www |
www stream tcp6 nowait:600 httpd /usr/pkg/libexec/bozohttpd bozohttpd /var/www |
http stream tcp6 nowait:600 _httpd /usr/libexec/httpd httpd /var/www |
.Ed |
.Ed |
.Pp |
.Pp |
This would serve web pages from |
This would serve web pages from |
|
|
you can provide multiple IP-address based HTTP servers by having multiple |
you can provide multiple IP-address based HTTP servers by having multiple |
listening ports with different configurations. |
listening ports with different configurations. |
.Sh EXAMPLES |
.Sh EXAMPLES |
To configure set of virtual hosts, one would use an entry like: |
To configure set of virtual hosts, one would use an |
|
.Xr inetd.conf 5 |
|
entry like: |
.Bd -literal |
.Bd -literal |
www stream tcp nowait:600 httpd /usr/pkg/libexec/bozohttpd bozohttpd -v /var/vroot /var/www |
http stream tcp nowait:600 _httpd /usr/libexec/httpd httpd -v /var/vroot /var/www |
.Ed |
.Ed |
.Pp |
.Pp |
and inside |
and inside |
Line 320 with PHP, one must use the |
|
Line 325 with PHP, one must use the |
|
option to specify a CGI handler for a particular file type. |
option to specify a CGI handler for a particular file type. |
Typically this, this will be like: |
Typically this, this will be like: |
.Bd -literal |
.Bd -literal |
bozohttpd -C .php /usr/pkg/bin/php /var/www |
httpd -C .php /usr/pkg/bin/php /var/www |
.Ed |
.Ed |
.Sh NOTES |
.Sh NOTES |
This server supports the |
This server supports the |
Line 328 This server supports the |
|
Line 333 This server supports the |
|
.Em HTTP/1.0 |
.Em HTTP/1.0 |
and |
and |
.Em HTTP/1.1 |
.Em HTTP/1.1 |
standards. The |
standards. |
.Em HTTP/1.1 |
Support for these protocols is very minimal and many optional features are |
support is based on the Internet Draft |
not supported. |
.Dq draft-ietf-http-v11-spec-rev-06 , |
|
which has been replaced by RFC 2616 as the standard. |
|
Support for these |
|
protocols is very minimal and many optional features are not supported. |
|
.Pp |
.Pp |
.Nm |
.Nm |
can be compiled without CGI support (NO_CGIBIN_SUPPORT), user |
can be compiled without CGI support (NO_CGIBIN_SUPPORT), user |
Line 345 macros when building |
|
Line 346 macros when building |
|
.Nm . |
.Nm . |
.Sh HTTP BASIC AUTHORISATION |
.Sh HTTP BASIC AUTHORISATION |
.Nm |
.Nm |
has support for HTTP Basic Authorisation that is excluded by default. |
has support for HTTP Basic Authorisation. |
|
If a file named |
|
.Pa .htpasswd |
|
exists in the directory of the current request, |
|
.Nm |
|
will restrict access to documents in that directory |
|
using the RFC 2617 HTTP |
|
.Dq Basic |
|
authentication scheme. |
|
.Pp |
|
Note: |
|
This does not recursively protect any sub-directories. |
|
.Pp |
|
The |
|
.Pa .htpasswd |
|
file contains lines delimited with a colon containing |
|
usernames and passwords hashed with |
|
.Xr crypt 3 , |
|
for example: |
|
.Bd -literal |
|
heather:$1$pZWI4tH/$DzDPl63i6VvVRv2lJNV7k1 |
|
jeremy:A.xewbx2DpQ8I |
|
.Ed |
|
.Pp |
|
On |
|
.Nx , |
|
the |
|
.Xr pwhash 1 |
|
utility may be used to generate hashed passwords. |
|
.Pp |
|
While |
|
.Nm |
|
distributed with |
|
.Nx |
|
has support for HTTP Basic Authorisation enabled by default, |
|
the portable distribution it is excluded. |
Compile |
Compile |
.Nm |
.Nm |
with |
with |
|
|
on the compiler command line to enable this support. It may require |
on the compiler command line to enable this support. It may require |
linking with the crypt library, using |
linking with the crypt library, using |
.Dq -lcrypt . |
.Dq -lcrypt . |
.Nm . |
|
.Sh FILES |
.Sh FILES |
.Nm |
.Nm |
looks for a couple of special files in directories that allow certain features |
looks for a couple of special files in directories that allow certain features |
Line 400 program was first written in perl, based |
|
Line 435 program was first written in perl, based |
|
called |
called |
.Dq tinyhttpd . |
.Dq tinyhttpd . |
It was then rewritten from scratch in perl, and then once again in C. |
It was then rewritten from scratch in perl, and then once again in C. |
|
It was known for many years as |
|
.Dq bozohttpd . |
|
.Dq bozohttpd |
|
version 20060517 was integrated into |
|
.Nx 5.0 |
|
as |
|
.Nm . |
The focus has always been simplicity and security, with minimal features |
The focus has always been simplicity and security, with minimal features |
and regular code audits. |
and regular code audits. |
This manual documents |
This manual documents |
.Nm |
.Nm |
version 20050410. |
version 20080303. |
.Sh AUTHORS |
.Sh AUTHORS |
.Nm |
.Nm |
was written by Matthew R. Green |
was written by Matthew R. Green |
Line 413 was written by Matthew R. Green |
|
Line 455 was written by Matthew R. Green |
|
The large list of contributors includes: |
The large list of contributors includes: |
.Bl -dash |
.Bl -dash |
.It |
.It |
|
Arnaud Lacombe |
|
.Aq alc@netbs.dorg |
|
provided some clean up for memory leaks |
|
.It |
|
Christoph Badura |
|
.Aq bad@bsd.de |
|
provided Range: header support |
|
.It |
Julian Coleman |
Julian Coleman |
.Aq jdc@coris.org.uk |
.Aq jdc@coris.org.uk |
provided an IPv6 bugfix |
provided an IPv6 bugfix |
|
|
provided many various fixes, including cgi-bin fixes & enhancements, |
provided many various fixes, including cgi-bin fixes & enhancements, |
HTTP basic authorisation support and much code clean up |
HTTP basic authorisation support and much code clean up |
.It |
.It |
|
Jeremey Reed |
|
.Aq reed@netbsd.org |
|
provided several clean up fixes, and man page updates |
|
.It |
Scott Reynolds |
Scott Reynolds |
.Aq scottr@netbsd.org |
.Aq scottr@netbsd.org |
provided various fixes |
provided various fixes |
.It |
.It |
Tyler Retzlaff |
Tyler Retzlaff |
.Aq rtr@eterna.com.au |
.Aq rtr@eterna.com.au |
provided SSL support, cgi-bin fixes and random other stuff |
provided SSL support, cgi-bin fixes and much other random other stuff |
.It |
.It |
Steve Rumble |
Steve Rumble |
.Aq rumble@ephemeral.org |
.Aq rumble@ephemeral.org |