puppetlabs-apache icon indicating copy to clipboard operation
puppetlabs-apache copied to clipboard

Add ability to support Location not via custom blocks

Open sergey-ganchuk opened this issue 2 years ago • 4 comments

Use Case

I was trying to configure reverse proxy and found that there is not possible to create location directives not via custom blocks.

Describe the Solution You Would Like

Add ability to manage locations via puppet and hiera directly.

Describe Alternatives You've Considered

Templating of full vhost configuration is not so good solution.

sergey-ganchuk avatar May 03 '23 06:05 sergey-ganchuk

Have you tried the $apache::vhost::directories parameter? That can be used, though it is fairly complex and you need to read the template itself to figure it out.

You can also use apache::vhost::proxy.

ekohl avatar May 03 '23 10:05 ekohl

Yep, It would be more clear if there would be ability to use location directive either.

sergey-ganchuk avatar May 03 '23 10:05 sergey-ganchuk

You can, though it's not clearly documented with an example. The provider key can be used. What I pass elsewhere:

$directories = [
  {
    'provider' => 'location',
    'path' => '/my/path',
    'request_headers' => ["set SSL_CLIENT_S_DN \"admin\""],
    'requires' => ["expr %{SSL_CLIENT_S_DN_CN} == \"${somevar}\""],
  },
]

ekohl avatar May 03 '23 10:05 ekohl

Thank you, @ekohl, for your contributions. @sergey-ganchuk, we haven't received any feedback from you yet. Could you please review and confirm if it is functioning as anticipated for you?

Ramesh7 avatar Sep 20 '23 06:09 Ramesh7