Sunday, September 15, 2024

Re: Multiple httpd.conf rules within location brackets must be on separate lines

On 9/15/24 9:42 AM, Rubén Llorente wrote:
> I have a production site with lots of rules which look like:
>
> location "/someplace/*.ext" { pass }
>
> location "/someplace/something.ht*" { block }
I meant for more than one rule in the location block.

Based on your example, the following will not pass the syntax test:

location "someplace/something.ht*" { block, no log }

Thank you,


Paul
>
>
> Paul Pace wrote:
>> I just discovered that location block rules in httpd.conf can only be
>> on separate lines. For example, the following does not pass the syntax
>> test (httpd -n):
>>
>> location "foo" { block, no log }
>>
>> But this passes:
>>
>> location "foo" {
>>      block
>>      no log
>> }
>>
>> However, server block rules can contain more than one rule on a line.
>> For example:
>>
>> tcp { backlog 128, no sack }
>>
>> I was just wondering if this is the expected output for httpd.conf.
>>
>> Thank you,
>>
>>
>> Paul
>>

No comments:

Post a Comment