Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd Document script handler issues with httpd(8).



details:   https://anonhg.NetBSD.org/src/rev/94381b9a76fc
branches:  trunk
changeset: 357805:94381b9a76fc
user:      wiz <wiz%NetBSD.org@localhost>
date:      Tue Nov 28 12:22:27 2017 +0000

description:
Document script handler issues with httpd(8).
>From martin@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.

diffstat:

 libexec/httpd/bozohttpd.8 |  53 +++++++++++++++++++++++++++++++++-------------
 1 files changed, 38 insertions(+), 15 deletions(-)

diffs (155 lines):

diff -r 5d000ee4509a -r 94381b9a76fc libexec/httpd/bozohttpd.8
--- a/libexec/httpd/bozohttpd.8 Tue Nov 28 11:59:16 2017 +0000
+++ b/libexec/httpd/bozohttpd.8 Tue Nov 28 12:22:27 2017 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: bozohttpd.8,v 1.67 2017/07/07 07:05:49 mrg Exp $
+.\"    $NetBSD: bozohttpd.8,v 1.68 2017/11/28 12:22:27 wiz Exp $
 .\"
 .\"    $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd February 1, 2017
+.Dd November 28, 2017
 .Dt BOZOHTTPD 8
 .Os
 .Sh NAME
@@ -219,7 +219,7 @@
 .It Fl P Ar pidfile
 Causes
 .Nm
-to create a pid file in
+to create a PID file in
 .Ar pidfile
 when run in daemon mode with the
 .Fl b
@@ -284,7 +284,7 @@
 for the request, then
 .Ar slashdir
 will be used.
-The default behaviour is to return 404 (Not Found.)
+The default behavior is to return 404 (Not Found.)
 .It Fl v Ar virtualroot
 Enables virtual hosting support.
 Directories in
@@ -314,7 +314,7 @@
 .Xr SSL_CTX_set_cipher_list 3 ) .
 .It Fl Z Ar certificate_path privatekey_path
 Sets the path to the server certificate file and the private key file
-in pem format.
+in PEM format.
 It also causes
 .Nm
 to start SSL mode.
@@ -388,9 +388,9 @@
 and SSL support (NO_SSL_SUPPORT)
 by defining the listed macros when building
 .Nm .
-.Ss HTTP BASIC AUTHORISATION
+.Ss HTTP BASIC AUTHORIZATION
 .Nm
-has support for HTTP Basic Authorisation.
+has support for HTTP Basic Authorization.
 If a file named
 .Pa .htpasswd
 exists in the directory of the current request,
@@ -406,7 +406,7 @@
 The
 .Pa .htpasswd
 file contains lines delimited with a colon containing
-usernames and passwords hashed with
+user names and passwords hashed with
 .Xr crypt 3 ,
 for example:
 .Bd -literal
@@ -424,7 +424,7 @@
 .Nm
 distributed with
 .Nx
-has support for HTTP Basic Authorisation enabled by default,
+has support for HTTP Basic Authorization enabled by default,
 in the portable distribution it is excluded.
 Compile
 .Nm
@@ -458,7 +458,7 @@
 to be provided on a per-directory basis.
 In addition to the
 .Pa .htpasswd
-used by HTTP basic authorisation,
+used by HTTP basic authorization,
 if a
 .Pa .bzdirect
 file is found (contents are irrelevant)
@@ -478,7 +478,7 @@
 .Pa .bzabsredirect
 symbolic link is found,
 .Nm
-will redirect to the absolute url pointed to by this symlink.
+will redirect to the absolute URL pointed to by this symlink.
 This is useful to redirect to different servers.
 Two forms of redirection are supported - symbolic link without schema will use
 .Em http://
@@ -514,6 +514,29 @@
 .Bd -literal
 httpd -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,
+as there are no command line options passed from
+.Nm
+to avoid security issues.
+.Pp
+If no CGI-aware wrapper exists, a simple shell script like the following
+might do.
+.Pp
+It would be invoked like:
+.Bd -literal
+httpd -C .pl /www-scripts/bin/run.perl /var/www
+.Ed
+and the script could look like:
+.Bd -literal
+#! /bin/sh
+
+if [ -r "$SCRIPT_FILENAME" -a -x "$SCRIPT_FILENAME" ]; then
+       exec /usr/pkg/bin/perl "$SCRIPT_FILENAME"
+fi
+
+exit 1
+.Ed
 .Sh SEE ALSO
 .Xr inetd.conf 5 ,
 .Xr inetd 8
@@ -606,11 +629,11 @@
 .It
 .An Nicolas Jombart
 .Aq Mt ecu%ipv42.net@localhost
-provided fixes for HTTP basic authorisation support
+provided fixes for HTTP basic authorization support
 .It
 .An Antti Kantee
 .Aq Mt pooka%NetBSD.org@localhost
-provided fixes for HTTP basic authorisation support
+provided fixes for HTTP basic authorization support
 .It
 .An Thomas Klausner
 .Aq Mt wiz%NetBSD.org@localhost
@@ -644,7 +667,7 @@
 .An Luke Mewburn
 .Aq Mt lukem%NetBSD.org@localhost
 provided many various fixes, including cgi-bin fixes and enhancements,
-HTTP basic authorisation support and much code clean up
+HTTP basic authorization support and much code clean up
 .It
 .An Rajeev V. Pillai
 .Aq Mt rajeev_v_pillai%yahoo.com@localhost
@@ -686,7 +709,7 @@
 .It
 .An Holger Weiss
 .Aq Mt holger%CIS.FU-Berlin.DE@localhost
-provided http authorisation fixes
+provided http authorization fixes
 .It
 .Aq Mt xs%kittenz.org@localhost
 provided chroot and change-to-user support, and other various fixes



Home | Main Index | Thread Index | Old Index