1*61d06d6bSBaptiste Daroussin.\" $Id: man.cgi.8,v 1.23 2018/05/20 21:48:44 schwarze Exp $ 2*61d06d6bSBaptiste Daroussin.\" 3*61d06d6bSBaptiste Daroussin.\" Copyright (c) 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org> 4*61d06d6bSBaptiste Daroussin.\" 5*61d06d6bSBaptiste Daroussin.\" Permission to use, copy, modify, and distribute this software for any 6*61d06d6bSBaptiste Daroussin.\" purpose with or without fee is hereby granted, provided that the above 7*61d06d6bSBaptiste Daroussin.\" copyright notice and this permission notice appear in all copies. 8*61d06d6bSBaptiste Daroussin.\" 9*61d06d6bSBaptiste Daroussin.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*61d06d6bSBaptiste Daroussin.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*61d06d6bSBaptiste Daroussin.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*61d06d6bSBaptiste Daroussin.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*61d06d6bSBaptiste Daroussin.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*61d06d6bSBaptiste Daroussin.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*61d06d6bSBaptiste Daroussin.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*61d06d6bSBaptiste Daroussin.\" 17*61d06d6bSBaptiste Daroussin.Dd $Mdocdate: May 20 2018 $ 18*61d06d6bSBaptiste Daroussin.Dt MAN.CGI 8 19*61d06d6bSBaptiste Daroussin.Os 20*61d06d6bSBaptiste Daroussin.Sh NAME 21*61d06d6bSBaptiste Daroussin.Nm man.cgi 22*61d06d6bSBaptiste Daroussin.Nd CGI program to search and display manual pages 23*61d06d6bSBaptiste Daroussin.Sh DESCRIPTION 24*61d06d6bSBaptiste DaroussinThe 25*61d06d6bSBaptiste Daroussin.Nm 26*61d06d6bSBaptiste DaroussinCGI program searches for manual pages on a WWW server 27*61d06d6bSBaptiste Daroussinand displays them to HTTP clients, 28*61d06d6bSBaptiste Daroussinproviding functionality equivalent to the 29*61d06d6bSBaptiste Daroussin.Xr man 1 30*61d06d6bSBaptiste Daroussinand 31*61d06d6bSBaptiste Daroussin.Xr apropos 1 32*61d06d6bSBaptiste Daroussinutilities. 33*61d06d6bSBaptiste DaroussinIt can use multiple manual trees in parallel. 34*61d06d6bSBaptiste Daroussin.Ss HTML search interface 35*61d06d6bSBaptiste DaroussinAt the top of each generated HTML page, 36*61d06d6bSBaptiste Daroussin.Nm 37*61d06d6bSBaptiste Daroussindisplays a search form containing these elements: 38*61d06d6bSBaptiste Daroussin.Bl -enum 39*61d06d6bSBaptiste Daroussin.It 40*61d06d6bSBaptiste DaroussinAn input box for search queries, expecting 41*61d06d6bSBaptiste Daroussineither a name of a manual page or an 42*61d06d6bSBaptiste Daroussin.Ar expression 43*61d06d6bSBaptiste Daroussinusing the syntax described in the 44*61d06d6bSBaptiste Daroussin.Xr apropos 1 45*61d06d6bSBaptiste Daroussinmanual; filling this in is required for each search. 46*61d06d6bSBaptiste Daroussin.Pp 47*61d06d6bSBaptiste DaroussinThe expression is broken into words at whitespace. 48*61d06d6bSBaptiste DaroussinWhitespace characters and backslashes can be escaped 49*61d06d6bSBaptiste Daroussinby prepending a backslash. 50*61d06d6bSBaptiste DaroussinThe effect of prepending a backslash to another character is undefined; 51*61d06d6bSBaptiste Daroussinin the current implementation, it has no effect. 52*61d06d6bSBaptiste Daroussin.It 53*61d06d6bSBaptiste DaroussinA 54*61d06d6bSBaptiste Daroussin.Xr man 1 55*61d06d6bSBaptiste Daroussinsubmit button. 56*61d06d6bSBaptiste DaroussinThe string in the input box is interpreted as the name of a manual page. 57*61d06d6bSBaptiste Daroussin.It 58*61d06d6bSBaptiste DaroussinAn 59*61d06d6bSBaptiste Daroussin.Xr apropos 1 60*61d06d6bSBaptiste Daroussinsubmit button. 61*61d06d6bSBaptiste DaroussinThe string in the input box is interpreted as a search 62*61d06d6bSBaptiste Daroussin.Ar expression . 63*61d06d6bSBaptiste Daroussin.It 64*61d06d6bSBaptiste DaroussinA dropdown menu to optionally select a manual section. 65*61d06d6bSBaptiste DaroussinIf one is provided, it has the same effect as the 66*61d06d6bSBaptiste Daroussin.Xr man 1 67*61d06d6bSBaptiste Daroussinand 68*61d06d6bSBaptiste Daroussin.Xr apropos 1 69*61d06d6bSBaptiste Daroussin.Fl s 70*61d06d6bSBaptiste Daroussinoption. 71*61d06d6bSBaptiste DaroussinOtherwise, pages from all sections are shown. 72*61d06d6bSBaptiste Daroussin.It 73*61d06d6bSBaptiste DaroussinA dropdown menu to optionally select an architecture. 74*61d06d6bSBaptiste DaroussinIf one is provided, it has the same effect as the 75*61d06d6bSBaptiste Daroussin.Xr man 1 76*61d06d6bSBaptiste Daroussinand 77*61d06d6bSBaptiste Daroussin.Xr apropos 1 78*61d06d6bSBaptiste Daroussin.Fl S 79*61d06d6bSBaptiste Daroussinoption. 80*61d06d6bSBaptiste DaroussinBy default, pages for all architectures are shown. 81*61d06d6bSBaptiste Daroussin.It 82*61d06d6bSBaptiste DaroussinA dropdown menu to select a manual tree. 83*61d06d6bSBaptiste DaroussinIf the configuration file 84*61d06d6bSBaptiste Daroussin.Pa /var/www/man/manpath.conf 85*61d06d6bSBaptiste Daroussincontains only one manpath, the dropdown menu is not shown. 86*61d06d6bSBaptiste DaroussinBy default, the first manpath given in the file is used. 87*61d06d6bSBaptiste Daroussin.El 88*61d06d6bSBaptiste Daroussin.Ss Program output 89*61d06d6bSBaptiste DaroussinThe 90*61d06d6bSBaptiste Daroussin.Nm 91*61d06d6bSBaptiste Daroussinprogram generates five kinds of output pages: 92*61d06d6bSBaptiste Daroussin.Bl -tag -width Ds 93*61d06d6bSBaptiste Daroussin.It The index page. 94*61d06d6bSBaptiste DaroussinThis is returned when calling 95*61d06d6bSBaptiste Daroussin.Nm 96*61d06d6bSBaptiste Daroussinwithout 97*61d06d6bSBaptiste Daroussin.Ev PATH_INFO 98*61d06d6bSBaptiste Daroussinand without a 99*61d06d6bSBaptiste Daroussin.Ev QUERY_STRING . 100*61d06d6bSBaptiste DaroussinIt serves as a starting point for using the program 101*61d06d6bSBaptiste Daroussinand shows the search form only. 102*61d06d6bSBaptiste Daroussin.It A list page. 103*61d06d6bSBaptiste DaroussinLists are returned when searches match more than one manual page. 104*61d06d6bSBaptiste DaroussinThe first column shows the names and section numbers of manuals 105*61d06d6bSBaptiste Daroussinas clickable links. 106*61d06d6bSBaptiste DaroussinThe second column shows the one-line descriptions of the manuals. 107*61d06d6bSBaptiste DaroussinFor 108*61d06d6bSBaptiste Daroussin.Xr man 1 109*61d06d6bSBaptiste Daroussinstyle searches, the content of the first manual page follows the list. 110*61d06d6bSBaptiste Daroussin.It A manual page. 111*61d06d6bSBaptiste DaroussinThis output format is used when a search matches exactly one 112*61d06d6bSBaptiste Daroussinmanual page, or when a link on a list page or an 113*61d06d6bSBaptiste Daroussin.Ic \&Xr 114*61d06d6bSBaptiste Daroussinlink on another manual page is followed. 115*61d06d6bSBaptiste Daroussin.It A no-result page. 116*61d06d6bSBaptiste DaroussinThis is shown when a search request returns no results - 117*61d06d6bSBaptiste Daroussineither because it violates the query syntax, or because 118*61d06d6bSBaptiste Daroussinthe search does not match any manual pages. 119*61d06d6bSBaptiste Daroussin.It \&An error page. 120*61d06d6bSBaptiste DaroussinThis cannot happen by merely clicking the 121*61d06d6bSBaptiste Daroussin.Dq Search 122*61d06d6bSBaptiste Daroussinbutton, but only by manually entering an invalid URI. 123*61d06d6bSBaptiste DaroussinIt does not show the search form, but only an error message 124*61d06d6bSBaptiste Daroussinand a link back to the index page. 125*61d06d6bSBaptiste Daroussin.El 126*61d06d6bSBaptiste Daroussin.Ss Setup 127*61d06d6bSBaptiste DaroussinFor each manual tree, create one first-level subdirectory below 128*61d06d6bSBaptiste Daroussin.Pa /var/www/man . 129*61d06d6bSBaptiste DaroussinThe name of one of these directories is called a 130*61d06d6bSBaptiste Daroussin.Dq manpath 131*61d06d6bSBaptiste Daroussinin the context of 132*61d06d6bSBaptiste Daroussin.Nm . 133*61d06d6bSBaptiste DaroussinCreate a single ASCII text file 134*61d06d6bSBaptiste Daroussin.Pa /var/www/man/manpath.conf 135*61d06d6bSBaptiste Daroussincontaining the names of these directories, one per line. 136*61d06d6bSBaptiste DaroussinThe directory given first is used as the default manpath. 137*61d06d6bSBaptiste Daroussin.Pp 138*61d06d6bSBaptiste DaroussinInside each of these directories, use the same directory and file 139*61d06d6bSBaptiste Daroussinstructure as found below 140*61d06d6bSBaptiste Daroussin.Pa /usr/share/man , 141*61d06d6bSBaptiste Daroussinthat is, second-level subdirectories 142*61d06d6bSBaptiste Daroussin.Pa /var/www/man/*/man1 , /var/www/man/*/man2 143*61d06d6bSBaptiste Daroussinetc. containing source 144*61d06d6bSBaptiste Daroussin.Xr mdoc 7 145*61d06d6bSBaptiste Daroussinand 146*61d06d6bSBaptiste Daroussin.Xr man 7 147*61d06d6bSBaptiste Daroussinmanuals with file name extensions matching the section numbers, 148*61d06d6bSBaptiste Daroussinsecond-level subdirectories 149*61d06d6bSBaptiste Daroussin.Pa /var/www/man/*/cat1 , /var/www/man/*/cat2 150*61d06d6bSBaptiste Daroussinetc. containing preformatted manuals with the file name extension 151*61d06d6bSBaptiste Daroussin.Sq 0 , 152*61d06d6bSBaptiste Daroussinand optional third-level subdirectories for architectures. 153*61d06d6bSBaptiste DaroussinUse 154*61d06d6bSBaptiste Daroussin.Xr makewhatis 8 155*61d06d6bSBaptiste Daroussinto create a 156*61d06d6bSBaptiste Daroussin.Xr mandoc.db 5 157*61d06d6bSBaptiste Daroussindatabase inside each manpath. 158*61d06d6bSBaptiste Daroussin.Pp 159*61d06d6bSBaptiste DaroussinConfigure your web server to execute CGI programs located in 160*61d06d6bSBaptiste Daroussin.Pa /cgi-bin . 161*61d06d6bSBaptiste DaroussinWhen using 162*61d06d6bSBaptiste Daroussin.Ox 163*61d06d6bSBaptiste Daroussin.Xr httpd 8 , 164*61d06d6bSBaptiste Daroussinthe 165*61d06d6bSBaptiste Daroussin.Xr slowcgi 8 166*61d06d6bSBaptiste Daroussinproxy daemon is needed to translate FastCGI requests to plain old CGI. 167*61d06d6bSBaptiste Daroussin.Pp 168*61d06d6bSBaptiste DaroussinTo compile 169*61d06d6bSBaptiste Daroussin.Nm , 170*61d06d6bSBaptiste Daroussinfirst copy 171*61d06d6bSBaptiste Daroussin.Pa cgi.h.example 172*61d06d6bSBaptiste Daroussinto 173*61d06d6bSBaptiste Daroussin.Pa cgi.h 174*61d06d6bSBaptiste Daroussinand edit it according to your needs. 175*61d06d6bSBaptiste DaroussinIt contains the following compile-time definitions: 176*61d06d6bSBaptiste Daroussin.Bl -tag -width Ds 177*61d06d6bSBaptiste Daroussin.It Ev COMPAT_OLDURI 178*61d06d6bSBaptiste DaroussinOnly useful for running on www.openbsd.org to deal with old URIs containing 179*61d06d6bSBaptiste Daroussin.Qq "manpath=OpenBSD " 180*61d06d6bSBaptiste Daroussinwhere the blank character has to be translated to a hyphen. 181*61d06d6bSBaptiste DaroussinWhen compiling for other sites, this definition can be deleted. 182*61d06d6bSBaptiste Daroussin.It Dv CSS_DIR 183*61d06d6bSBaptiste DaroussinAn optional file system path to the directory containing the file 184*61d06d6bSBaptiste Daroussin.Pa mandoc.css , 185*61d06d6bSBaptiste Daroussinto be specified relative to the server's document root, 186*61d06d6bSBaptiste Daroussinand to be specified without a trailing slash. 187*61d06d6bSBaptiste DaroussinWhen empty, the CSS file is assumed to be in the document root. 188*61d06d6bSBaptiste DaroussinOtherwise, a leading slash is needed. 189*61d06d6bSBaptiste DaroussinThis is used in generated HTML code. 190*61d06d6bSBaptiste Daroussin.It Dv CUSTOMIZE_TITLE 191*61d06d6bSBaptiste DaroussinAn ASCII string to be used for the HTML <TITLE> element. 192*61d06d6bSBaptiste Daroussin.It Dv MAN_DIR 193*61d06d6bSBaptiste DaroussinA file system path to the 194*61d06d6bSBaptiste Daroussin.Nm 195*61d06d6bSBaptiste Daroussindata directory relative to the web server 196*61d06d6bSBaptiste Daroussin.Xr chroot 2 197*61d06d6bSBaptiste Daroussindirectory, to be specified with a leading slash and without a trailing slash. 198*61d06d6bSBaptiste DaroussinIt needs to have at least one component; the root directory cannot be used 199*61d06d6bSBaptiste Daroussinfor this purpose. 200*61d06d6bSBaptiste DaroussinThe files 201*61d06d6bSBaptiste Daroussin.Pa manpath.conf , 202*61d06d6bSBaptiste Daroussin.Pa header.html , 203*61d06d6bSBaptiste Daroussinand 204*61d06d6bSBaptiste Daroussin.Pa footer.html 205*61d06d6bSBaptiste Daroussinare looked up in this directory. 206*61d06d6bSBaptiste DaroussinIt is also prepended to the manpath when opening 207*61d06d6bSBaptiste Daroussin.Xr mandoc.db 5 208*61d06d6bSBaptiste Daroussinand manual page files. 209*61d06d6bSBaptiste Daroussin.It Dv SCRIPT_NAME 210*61d06d6bSBaptiste DaroussinThe initial component of URIs, to be specified without leading 211*61d06d6bSBaptiste Daroussinand trailing slashes. 212*61d06d6bSBaptiste DaroussinIt can be empty. 213*61d06d6bSBaptiste Daroussin.El 214*61d06d6bSBaptiste Daroussin.Pp 215*61d06d6bSBaptiste DaroussinAfter editing 216*61d06d6bSBaptiste Daroussin.Pa cgi.h , 217*61d06d6bSBaptiste Daroussinrun 218*61d06d6bSBaptiste Daroussin.Pp 219*61d06d6bSBaptiste Daroussin.Dl make man.cgi 220*61d06d6bSBaptiste Daroussin.Pp 221*61d06d6bSBaptiste Daroussinand copy the resulting binary to the proper location, 222*61d06d6bSBaptiste Daroussinfor example using the command: 223*61d06d6bSBaptiste Daroussin.Pp 224*61d06d6bSBaptiste Daroussin.Dl make installcgi 225*61d06d6bSBaptiste Daroussin.Pp 226*61d06d6bSBaptiste DaroussinIn addition to that, make sure the default manpath contains the files 227*61d06d6bSBaptiste Daroussin.Pa man1/apropos.1 228*61d06d6bSBaptiste Daroussinand 229*61d06d6bSBaptiste Daroussin.Pa man8/man.cgi.8 , 230*61d06d6bSBaptiste Daroussinor the documentation links at the bottom of the index page will not work. 231*61d06d6bSBaptiste Daroussin.Ss URI interface 232*61d06d6bSBaptiste Daroussin.Nm 233*61d06d6bSBaptiste Daroussinuniform resource identifiers are not needed for interactive use, 234*61d06d6bSBaptiste Daroussinbut can be useful for deep linking. 235*61d06d6bSBaptiste DaroussinThey consist of: 236*61d06d6bSBaptiste Daroussin.Bl -enum 237*61d06d6bSBaptiste Daroussin.It 238*61d06d6bSBaptiste DaroussinThe 239*61d06d6bSBaptiste Daroussin.Cm http:// 240*61d06d6bSBaptiste Daroussinor 241*61d06d6bSBaptiste Daroussin.Cm https:// 242*61d06d6bSBaptiste Daroussinprotocol specifier. 243*61d06d6bSBaptiste Daroussin.It 244*61d06d6bSBaptiste DaroussinThe host name. 245*61d06d6bSBaptiste Daroussin.It 246*61d06d6bSBaptiste DaroussinThe 247*61d06d6bSBaptiste Daroussin.Dv SCRIPT_NAME , 248*61d06d6bSBaptiste Daroussinpreceded by a slash unless empty. 249*61d06d6bSBaptiste Daroussin.It 250*61d06d6bSBaptiste DaroussinTo show a single page, a slash, the manpath, another slash, 251*61d06d6bSBaptiste Daroussinand the name of the requested file, for example 252*61d06d6bSBaptiste Daroussin.Pa /OpenBSD-current/man1/mandoc.1 . 253*61d06d6bSBaptiste DaroussinThis can be abbreviated according to the following syntax: 254*61d06d6bSBaptiste Daroussin.Sm off 255*61d06d6bSBaptiste Daroussin.Op / Ar manpath 256*61d06d6bSBaptiste Daroussin.Op / Cm man Ar sec 257*61d06d6bSBaptiste Daroussin.Op / Ar arch 258*61d06d6bSBaptiste Daroussin.Pf / Ar name Op \&. Ar sec 259*61d06d6bSBaptiste Daroussin.Sm on 260*61d06d6bSBaptiste Daroussin.It 261*61d06d6bSBaptiste DaroussinFor searches, a query string starting with a question mark 262*61d06d6bSBaptiste Daroussinand consisting of 263*61d06d6bSBaptiste Daroussin.Ar key Ns = Ns Ar value 264*61d06d6bSBaptiste Daroussinpairs, separated by ampersands, for example 265*61d06d6bSBaptiste Daroussin.Pa ?manpath=OpenBSD-current&query=mandoc . 266*61d06d6bSBaptiste DaroussinSupported keys are 267*61d06d6bSBaptiste Daroussin.Cm manpath , 268*61d06d6bSBaptiste Daroussin.Cm query , 269*61d06d6bSBaptiste Daroussin.Cm sec , 270*61d06d6bSBaptiste Daroussin.Cm arch , 271*61d06d6bSBaptiste Daroussincorresponding to 272*61d06d6bSBaptiste Daroussin.Xr apropos 1 273*61d06d6bSBaptiste Daroussin.Fl M , 274*61d06d6bSBaptiste Daroussin.Ar expression , 275*61d06d6bSBaptiste Daroussin.Fl s , 276*61d06d6bSBaptiste Daroussin.Fl S , 277*61d06d6bSBaptiste Daroussinrespectively, and 278*61d06d6bSBaptiste Daroussin.Cm apropos , 279*61d06d6bSBaptiste Daroussinwhich is a boolean parameter to select or deselect the 280*61d06d6bSBaptiste Daroussin.Xr apropos 1 281*61d06d6bSBaptiste Daroussinquery mode. 282*61d06d6bSBaptiste DaroussinFor backward compatibility with the traditional 283*61d06d6bSBaptiste Daroussin.Nm , 284*61d06d6bSBaptiste Daroussin.Cm sektion 285*61d06d6bSBaptiste Daroussinis supported as an alias for 286*61d06d6bSBaptiste Daroussin.Cm sec . 287*61d06d6bSBaptiste Daroussin.El 288*61d06d6bSBaptiste Daroussin.Ss Restricted character set 289*61d06d6bSBaptiste DaroussinFor security reasons, in particular to prevent cross site scripting 290*61d06d6bSBaptiste Daroussinattacks, some strings used by 291*61d06d6bSBaptiste Daroussin.Nm 292*61d06d6bSBaptiste Daroussincan only contain the following characters: 293*61d06d6bSBaptiste Daroussin.Pp 294*61d06d6bSBaptiste Daroussin.Bl -dash -compact -offset indent 295*61d06d6bSBaptiste Daroussin.It 296*61d06d6bSBaptiste Daroussinlower case and upper case ASCII letters 297*61d06d6bSBaptiste Daroussin.It 298*61d06d6bSBaptiste Daroussinthe ten decimal digits 299*61d06d6bSBaptiste Daroussin.It 300*61d06d6bSBaptiste Daroussinthe dash 301*61d06d6bSBaptiste Daroussin.Pq Sq - 302*61d06d6bSBaptiste Daroussin.It 303*61d06d6bSBaptiste Daroussinthe dot 304*61d06d6bSBaptiste Daroussin.Pq Sq \&. 305*61d06d6bSBaptiste Daroussin.It 306*61d06d6bSBaptiste Daroussinthe slash 307*61d06d6bSBaptiste Daroussin.Pq Sq / 308*61d06d6bSBaptiste Daroussin.It 309*61d06d6bSBaptiste Daroussinthe underscore 310*61d06d6bSBaptiste Daroussin.Pq Sq _ 311*61d06d6bSBaptiste Daroussin.El 312*61d06d6bSBaptiste Daroussin.Pp 313*61d06d6bSBaptiste DaroussinIn particular, this applies to all manpaths and architecture names. 314*61d06d6bSBaptiste Daroussin.Sh ENVIRONMENT 315*61d06d6bSBaptiste DaroussinThe web server may pass the following CGI variables to 316*61d06d6bSBaptiste Daroussin.Nm : 317*61d06d6bSBaptiste Daroussin.Bl -tag -width Ds 318*61d06d6bSBaptiste Daroussin.It Ev SCRIPT_NAME 319*61d06d6bSBaptiste DaroussinThe initial part of the URI passed from the client to the server, 320*61d06d6bSBaptiste Daroussinstarting after the server's host name and ending before 321*61d06d6bSBaptiste Daroussin.Ev PATH_INFO . 322*61d06d6bSBaptiste DaroussinThis is ignored by 323*61d06d6bSBaptiste Daroussin.Nm . 324*61d06d6bSBaptiste DaroussinWhen constructing URIs for links and redirections, the 325*61d06d6bSBaptiste Daroussin.Dv SCRIPT_NAME 326*61d06d6bSBaptiste Daroussinpreprocessor constant is used instead. 327*61d06d6bSBaptiste Daroussin.It Ev PATH_INFO 328*61d06d6bSBaptiste DaroussinThe final part of the URI path passed from the client to the server, 329*61d06d6bSBaptiste Daroussinstarting after the 330*61d06d6bSBaptiste Daroussin.Ev SCRIPT_NAME 331*61d06d6bSBaptiste Daroussinand ending before the 332*61d06d6bSBaptiste Daroussin.Ev QUERY_STRING . 333*61d06d6bSBaptiste DaroussinIt is used by the 334*61d06d6bSBaptiste Daroussin.Cm show 335*61d06d6bSBaptiste Daroussinpage to acquire the manpath and filename it needs. 336*61d06d6bSBaptiste Daroussin.It Ev QUERY_STRING 337*61d06d6bSBaptiste DaroussinThe HTTP query string passed from the client to the server. 338*61d06d6bSBaptiste DaroussinIt is the final part of the URI, after the question mark. 339*61d06d6bSBaptiste DaroussinIt is used by the 340*61d06d6bSBaptiste Daroussin.Cm search 341*61d06d6bSBaptiste Daroussinpage to acquire the named parameters it needs. 342*61d06d6bSBaptiste Daroussin.El 343*61d06d6bSBaptiste Daroussin.Sh FILES 344*61d06d6bSBaptiste Daroussin.Bl -tag -width Ds 345*61d06d6bSBaptiste Daroussin.It Pa /var/www 346*61d06d6bSBaptiste DaroussinDefault web server 347*61d06d6bSBaptiste Daroussin.Xr chroot 2 348*61d06d6bSBaptiste Daroussindirectory. 349*61d06d6bSBaptiste DaroussinAll the following paths are specified relative to this directory. 350*61d06d6bSBaptiste Daroussin.It Pa /cgi-bin/man.cgi 351*61d06d6bSBaptiste DaroussinThe usual file system path to the 352*61d06d6bSBaptiste Daroussin.Nm 353*61d06d6bSBaptiste Daroussinprogram inside the web server 354*61d06d6bSBaptiste Daroussin.Xr chroot 2 355*61d06d6bSBaptiste Daroussindirectory. 356*61d06d6bSBaptiste DaroussinA different name can be chosen, but in any case, it needs to be configured in 357*61d06d6bSBaptiste Daroussin.Xr httpd.conf 5 . 358*61d06d6bSBaptiste Daroussin.It Pa /htdocs 359*61d06d6bSBaptiste DaroussinThe file system path to the server document root directory 360*61d06d6bSBaptiste Daroussinrelative to the server 361*61d06d6bSBaptiste Daroussin.Xr chroot 2 362*61d06d6bSBaptiste Daroussindirectory. 363*61d06d6bSBaptiste DaroussinThis is part of the web server configuration and not specific to 364*61d06d6bSBaptiste Daroussin.Nm . 365*61d06d6bSBaptiste Daroussin.It Pa /htdocs/mandoc.css 366*61d06d6bSBaptiste DaroussinA style sheet for 367*61d06d6bSBaptiste Daroussin.Xr mandoc 1 368*61d06d6bSBaptiste DaroussinHTML styling, referenced from each generated HTML page. 369*61d06d6bSBaptiste Daroussin.It Pa /man 370*61d06d6bSBaptiste DaroussinDefault 371*61d06d6bSBaptiste Daroussin.Nm 372*61d06d6bSBaptiste Daroussindata directory containing all the manual trees. 373*61d06d6bSBaptiste DaroussinCan be overridden by 374*61d06d6bSBaptiste Daroussin.Dv MAN_DIR . 375*61d06d6bSBaptiste Daroussin.It Pa /man/manpath.conf 376*61d06d6bSBaptiste DaroussinThe list of available manpaths, one per line. 377*61d06d6bSBaptiste DaroussinIf any of the lines in this file contains a slash 378*61d06d6bSBaptiste Daroussin.Pq Sq / 379*61d06d6bSBaptiste Daroussinor any character not contained in the 380*61d06d6bSBaptiste Daroussin.Sx Restricted character set , 381*61d06d6bSBaptiste Daroussin.Nm 382*61d06d6bSBaptiste Daroussinreports an internal server error and exits without doing anything. 383*61d06d6bSBaptiste Daroussin.It Pa /man/header.html 384*61d06d6bSBaptiste DaroussinAn optional file containing static HTML code to be inserted right 385*61d06d6bSBaptiste Daroussinafter opening the <BODY> element. 386*61d06d6bSBaptiste Daroussin.It Pa /man/footer.html 387*61d06d6bSBaptiste DaroussinAn optional file containing static HTML code to be inserted right 388*61d06d6bSBaptiste Daroussinbefore closing the <BODY> element. 389*61d06d6bSBaptiste Daroussin.It Pa /man/OpenBSD-current/man1/mandoc.1 390*61d06d6bSBaptiste DaroussinAn example 391*61d06d6bSBaptiste Daroussin.Xr mdoc 7 392*61d06d6bSBaptiste Daroussinsource file located below the 393*61d06d6bSBaptiste Daroussin.Dq OpenBSD-current 394*61d06d6bSBaptiste Daroussinmanpath. 395*61d06d6bSBaptiste Daroussin.El 396*61d06d6bSBaptiste Daroussin.Sh COMPATIBILITY 397*61d06d6bSBaptiste DaroussinThe 398*61d06d6bSBaptiste Daroussin.Nm 399*61d06d6bSBaptiste DaroussinCGI program is call-compatible with queries from the traditional 400*61d06d6bSBaptiste Daroussin.Pa man.cgi 401*61d06d6bSBaptiste Daroussinscript by Wolfram Schneider. 402*61d06d6bSBaptiste DaroussinHowever, the output looks quite different. 403*61d06d6bSBaptiste Daroussin.Sh SEE ALSO 404*61d06d6bSBaptiste Daroussin.Xr apropos 1 , 405*61d06d6bSBaptiste Daroussin.Xr mandoc.db 5 , 406*61d06d6bSBaptiste Daroussin.Xr makewhatis 8 , 407*61d06d6bSBaptiste Daroussin.Xr slowcgi 8 408*61d06d6bSBaptiste Daroussin.Sh HISTORY 409*61d06d6bSBaptiste DaroussinA version of 410*61d06d6bSBaptiste Daroussin.Nm 411*61d06d6bSBaptiste Daroussinbased on 412*61d06d6bSBaptiste Daroussin.Xr mandoc 1 413*61d06d6bSBaptiste Daroussinfirst appeared in mdocml-1.12.1 (March 2012). 414*61d06d6bSBaptiste DaroussinThe current 415*61d06d6bSBaptiste Daroussin.Xr mandoc.db 5 416*61d06d6bSBaptiste Daroussindatabase format first appeared in 417*61d06d6bSBaptiste Daroussin.Ox 6.1 . 418*61d06d6bSBaptiste Daroussin.Sh AUTHORS 419*61d06d6bSBaptiste Daroussin.An -nosplit 420*61d06d6bSBaptiste DaroussinThe 421*61d06d6bSBaptiste Daroussin.Nm 422*61d06d6bSBaptiste Daroussinprogram was written by 423*61d06d6bSBaptiste Daroussin.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv 424*61d06d6bSBaptiste Daroussinand is maintained by 425*61d06d6bSBaptiste Daroussin.An Ingo Schwarze Aq Mt schwarze@openbsd.org , 426*61d06d6bSBaptiste Daroussinwho also designed and implemented the database format. 427