Download raw body.
gotwebd(8): improve EXAMPLES section
On 2023/12/30 09:03:11 +0100, Stefan Sperling <stsp@stsp.name> wrote:
> On Fri, Dec 29, 2023 at 11:30:55PM +0100, Omar Polo wrote:
> > 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?
>
> The example that shows how to run two instances of gotwebd under
> different locations but within the same httpd server instance was
> useful. You are splitting this example up into two single-gotwebd
> http server sections. Otherwise I like this change.
I thought it was easier to read with the examples separated, but maybe
I've split too much. Updated diff that doesn't split the second example
in two:
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,37 +139,43 @@ 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"
- }
- }
+server "example.com" {
+ listen on * port 80
+ root "/htdocs/gotwebd"
+ location "/" {
+ fastcgi socket "/run/gotweb.sock"
+ }
+}
+.Ed
+.Pp
+Hosting multiple
+.Nm gotwebd
+instances on the same HTTP server under different path prefixes, with
+the first reached via the default
+.Ux Ns -domain socket, the second configured to listen on localhost
+port 9000:
+.Bd -literal -offset indent
+server "example.com" {
+ listen on * port 80
- # 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
- }
- }
+ location "/gotwebd-unix/" {
+ fastcgi socket "/run/gotweb.sock"
+ }
+ location "/gotwebd-unix/*" {
+ root "/htdocs/gotwebd"
+ request strip 1
+ }
+
+ location "/gotwebd-tcp/" {
+ fastcgi socket tcp localhost 9000
+ }
+ location "/gotwebd-tcp/*" {
+ root "/htdocs/gotwebd"
+ request strip 1
+ }
+}
.Ed
.Sh SEE ALSO
.Xr got 1 ,
gotwebd(8): improve EXAMPLES section