From: Omar Polo Subject: gotwebd(8): improve EXAMPLES section To: gameoftrees@openbsd.org Date: Fri, 29 Dec 2023 23:30:55 +0100 Split the various examples into separate Bd blocks rather than relying on comments to tell the samples apart. Also, while here, use hard tabs to indent the values. Re-reading the diff with `got diff -w' might be helpful. thoughts? diff /home/op/w/got commit - e114f3d1c194932aef73612868f0bedc33110110 path + /home/op/w/got blob - 933316538bcea15e930372de12d02f34f95eb043 file + gotwebd/gotwebd.8 --- gotwebd/gotwebd.8 +++ gotwebd/gotwebd.8 @@ -139,38 +139,48 @@ Directory for temporary files created by Example configuration for .Xr httpd.conf 5 : .Bd -literal -offset indent - types { include "/usr/share/misc/mime.types" } +types { include "/usr/share/misc/mime.types" } - # one gotwebd reachable at http://gotweb1.example.com/ - server "gotweb1.example.com" { - listen on * port 80 - root "/htdocs/gotwebd" - location "/" { - fastcgi socket "/run/gotweb.sock" - } - } - - # hosting multiple gotwebd instances on the same HTTP server: - # http://gotweb2.example.com/gotwebd-unix/ - # http://gotweb2.example.com/gotwebd-tcp/ - server "gotweb2.example.com" { - listen on * port 80 - location "/gotwebd-unix/" { - fastcgi socket "/run/gotweb.sock" - } - location "/gotwebd-unix/*" { - root "/htdocs/gotwebd" - request strip 1 - } - location "/gotwebd-tcp/" { - fastcgi socket tcp 127.0.0.1 9000 - } - location "/gotwebd-tcp/*" { - root "/htdocs/gotwebd" - request strip 1 - } - } +server "example.com" { + listen on * port 80 + root "/htdocs/gotwebd" + location "/" { + fastcgi socket "/run/gotweb.sock" + } +} .Ed +.Pp +To serve +.Nm gotwebd +under a specific path prefix: +.Bd -literal -offset indent +server "example.com" { + listen on * port 80 + location "/gotwebd/" { + fastcgi socket "/run/gotweb.sock" + } + location "/gotwebd/*" { + root "/htdocs/gotwebd" + request strip 1 + } +} +.Ed +.Pp +Same configuration but with +.Nm gotwebd +configured to listen on localhost port 9000: +.Bd -literal -offset indent +server "example.com" { + listen on * port 80 + location "/gotwebd/" { + fastcgi socket tcp localhost 9000 + } + location "/gotwebd/*" { + root "/htdocs/gotwebd" + request strip 1 + } +} +.Ed .Sh SEE ALSO .Xr got 1 , .Xr git-repository 5 ,