On 2023/08/13 11:27:18 +0100, Jason McIntyre <j...@kerhand.co.uk> wrote: > On Sun, Aug 13, 2023 at 11:21:39AM +0100, Stuart Henderson wrote: > > On 2023/08/13 11:13, Omar Polo wrote: > > > @@ -179,7 +179,8 @@ section starts with a declaration of the server > > > Each > > > .Ic server > > > section starts with a declaration of the server > > > -.Ar name : > > > +.Ar name . > > > +If no one matches the request the first one defined is used. > > > .Bl -tag -width Ds > > > .It Ic server Ar name Brq ... > > > Match the server name using shell globbing rules. > > > > The rest looks good, but I think this might be a little more clear as: > > > > i just got to stuart's mail. this reads nice and clear too. > jmc
Stuart, Jason, thanks! I like the updated text. Crystal Kolipe correctly noted offlist that it's not correct to say "the first defined", it's the first defined server matching the port. diff /usr/src commit - a7b17fe845fceeb2940fa5924ec5843681aa2c64 path + /usr/src blob - 16b086a9ee00cd6d8e796a890e9774968556f147 file + usr.sbin/httpd/httpd.conf.5 --- usr.sbin/httpd/httpd.conf.5 +++ usr.sbin/httpd/httpd.conf.5 @@ -98,7 +98,7 @@ server "default" { For example: .Bd -literal -offset indent ext_ip="10.0.0.1" -server "default" { +server "example.com" { listen on $ext_ip port 80 } .Ed @@ -179,7 +179,11 @@ section starts with a declaration of the server Each .Ic server section starts with a declaration of the server -.Ar name : +.Ar name . +If a request does not match any server name, it is handled by the +first defined +.Ic server +section that matches the listening port. .Bl -tag -width Ds .It Ic server Ar name Brq ... Match the server name using shell globbing rules. @@ -779,7 +783,7 @@ server "default" { .Bd -literal -offset indent prefork 2 -server "default" { +server "example.com" { listen on * port 80 } @@ -800,7 +804,7 @@ server "default" { .Qq egress group. .Bd -literal -offset indent -server "default" { +server "example.com" { listen on egress port 80 } .Ed