On Mon, Mar 04, 2019 at 03:46:25PM -0600, Alfred Morgan wrote:
> jmc wrote:
> > i think if you attached a diff to your mail, no matter how poorly
> > written, you would have a better chance of something happening.
> 
> How does this sound?
> A specified option may be written inside curly brackets in order to specify
> a block of one or more specified options.
> (diff included below)
> 

morning.

thanks for following this up with a diff!

regarding your sentence - it's confusing. this is a tough one to write,
i think. from everything following that sentence to the end of that
section, can everything take this {} notation?

        alias { x y z }

that is valid? or it's just command words that take lists of options,
like

        tls {
        cert x
        ciphers y
        }

the sentence doesn;t make this clear. i can't offer an improvement
without understand where it's valid. can you supply more detail (not in
a diff, just describe it).

> > where can {} be used? just here or other places? is there a general rule?
> 
> Yes, I tested several specified options and this appears to be a general
> rule. One thing I noticed, which made me include "one or more" in my
> documentation, is an optional specified option will not accept an empty
> curly brackets `{ }` such as the option `hsts [option]` won't allow to be
> written as `hsts { }`.
> 

so it applies just to commands which have an argument "option"?

> > what https examples would improve the page?
> 
> I believe a tls option with a multiple specified options block containing
> paths to acme-client default key and cert paths example would be great. And
> how about using named ports even.
> 

fair enough. i'll try and get some feedback on this/

jmc

> Index: httpd.conf.5
> ===================================================================
> RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v
> retrieving revision 1.103
> diff -u -p -r1.103 httpd.conf.5
> --- httpd.conf.5        19 Feb 2019 11:37:26 -0000      1.103
> +++ httpd.conf.5        4 Mar 2019 21:33:27 -0000
> @@ -155,7 +155,9 @@ see
>  .Xr patterns 7 .
>  .El
>  .Pp
> -Followed by a block of options that is enclosed in curly brackets:
> +Followed by a block of options that is enclosed in curly brackets.
> +A specified option may be written inside curly brackets in order to specify
> +a block of one or more specified options:
>  .Bl -tag -width Ds
>  .It Ic alias Ar name
>  Specify an additional alias
> @@ -714,9 +716,13 @@ the server will be matched based on the
>  .Bd -literal -offset indent
>  server "www.example.com" {
>         alias "example.com"
> -       listen on * port 80
> -       listen on * tls port 443
> +       listen on * port http
> +       listen on * tls port https
>         root "/htdocs/www.example.com"
> +        tls {
> +                key "/etc/ssl/private/example.com.key"
> +                certificate "/etc/ssl/example.com.fullchain.pem"
> +        }
>  }
> 
>  server "www.a.example.com" {
> 
> -- 
> -alfred

Reply via email to