Files
ports/www/bozohttpd/files/patch-bozohttpd.8
T
2026-10-04 04:07:15 +00:00

100 lines
2.6 KiB
Plaintext

--- bozohttpd.8.orig 2024-02-04 05:55:04 UTC
+++ bozohttpd.8
@@ -373,12 +373,26 @@ and 4 in the case of
.Fl C
and 4 in the case of
.Fl M . )
+.Ss DEFAULT CONFIGURATION
+On
+.Fx ,
+.Nm
+can be enabled as the default web server by adding the following options to
+.Pa /etc/rc.conf
+:
+.Bd -literal
+bozohttpd_enable (bool): Set it to "YES" to enable bozohttpd.
+ Default is "NO".
+bozohttpd_flags (str): Options to pass to bozohttpd.
+ Default is "-b -t /var/empty -U nobody /".
+ The last argument, slashdir, is required.
+.Ed
.Ss INETD CONFIGURATION
As
.Nm
-uses
+normally uses
.Xr inetd 8
-by default to process incoming TCP connections for HTTP requests
+to process incoming TCP connections for HTTP requests
(but see the
.Fl b
option),
@@ -390,8 +404,8 @@ entry would be:
.Xr inetd.conf 5
entry would be:
.Bd -literal
-http stream tcp nowait:600 _httpd /usr/libexec/httpd httpd /var/www
-http stream tcp6 nowait:600 _httpd /usr/libexec/httpd httpd /var/www
+http stream tcp nowait:600 www /usr/local/bin/bozohttpd httpd /var/www
+http stream tcp6 nowait:600 www /usr/local/bin/bozohttpd httpd /var/www
.Ed
.Pp
This would serve web pages from
@@ -405,7 +419,7 @@ Using the
default of 40.
.Pp
Using the
-.Nx
+.Fx
.Xr inetd 8 ,
you can provide multiple IP-address based HTTP servers by having multiple
listening ports with different configurations.
@@ -457,15 +471,15 @@ On
.Ed
.Pp
On
-.Nx ,
+.Fx ,
the
-.Xr pwhash 1
+.Xr openssl-passwd 1
utility may be used to generate hashed passwords.
.Pp
-While
+While the
+.Fx
+port of
.Nm
-distributed with
-.Nx
has support for HTTP Basic Authorization enabled by default,
in the portable distribution it is excluded.
Compile
@@ -603,7 +617,7 @@ entry like:
.Xr inetd.conf 5
entry like:
.Bd -literal
-http stream tcp nowait:600 _httpd /usr/libexec/httpd httpd -v /var/vroot /var/www
+http stream tcp nowait:600 www /usr/local/bin/bozohttpd httpd -v /var/vroot /var/www
.Ed
.Pp
and inside
@@ -621,7 +635,7 @@ Typically this will be like:
option to specify a CGI handler for a particular file type.
Typically this will be like:
.Bd -literal
-httpd -C .php /usr/pkg/bin/php-cgi /var/www
+bozohttpd -C .php /usr/pkg/bin/php-cgi /var/www
.Ed
.Pp
Note that a plain script interpreter can not be used directly as a cgihandler,
@@ -634,7 +648,7 @@ It would be invoked like:
.Pp
It would be invoked like:
.Bd -literal
-httpd -C .pl /www-scripts/bin/run.perl /var/www
+bozohttpd -C .pl /www-scripts/bin/run.perl /var/www
.Ed
and the script could look like:
.Bd -literal