rc-httpd(8): document how to use HTTP basic authentication

This commit is contained in:
Igor Böhm 2021-10-30 23:59:12 +00:00 committed by qwx
parent 07f8584723
commit 27af159fdc

View file

@ -80,6 +80,11 @@ variable. Fine-grained control of specific request strings may
be configured via a similar method acting upon the be configured via a similar method acting upon the
.I location .I location
and/or other variables. and/or other variables.
.PP
The
.I REMOTE_USER
variable provides a user identification string supplied by the
client as part of user authentication.
.SH EXAMPLES .SH EXAMPLES
The following examples demonstrate possible ways to configure The following examples demonstrate possible ways to configure
.BR select-handler. .BR select-handler.
@ -95,6 +100,20 @@ if(~ $SERVER_NAME 9front.org){
.EE .EE
.RE .RE
.PP .PP
HTTP basic authentication:
.RS
.EX
if(~ $SERVER_NAME *restricted.org){
PATH_INFO=$location
FS_ROOT=/usr/kgb/www/$SERVER_NAME
authorize
if(~ $REMOTE_USER (glenda kgb))
exec static-or-index
error 401
}
.EE
.RE
.PP
CGI: CGI:
.RS .RS
.EX .EX
@ -152,6 +171,8 @@ exec /rc/bin/rc-httpd/rc-httpd >>[2]/sys/log/www
.TP .TP
.B /rc/bin/rc-httpd/select-handler .B /rc/bin/rc-httpd/select-handler
.TP .TP
.B /rc/bin/rc-httpd/handlers/authorize
.TP
.B /rc/bin/rc-httpd/handlers/cgi .B /rc/bin/rc-httpd/handlers/cgi
.TP .TP
.B /rc/bin/rc-httpd/handlers/dir-index .B /rc/bin/rc-httpd/handlers/dir-index