Skip to content

Add support for IndexHeadInsert for directories - #2542

Open
trefzer wants to merge 1 commit into
puppetlabs:mainfrom
cirrax:dev_cirrax
Open

Add support for IndexHeadInsert for directories#2542
trefzer wants to merge 1 commit into
puppetlabs:mainfrom
cirrax:dev_cirrax

Conversation

@trefzer

@trefzer trefzer commented Apr 20, 2024

Copy link
Copy Markdown
Contributor

Summary

add option IndexHeadInsert for directories

Additional Context

Option was missing ;)

Related Issues (if any)

@smortex smortex changed the title add option IndexHeadInsert for directory Add support for IndexHeadInsert for directories Apr 20, 2024
@smortex

smortex commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

This option is also availabile in the global server config and virtual hosts. Do you want to add the corresponding parameters to this PR?

@trefzer

trefzer commented Apr 21, 2024

Copy link
Copy Markdown
Contributor Author

@smortex there is no need to add this as a parameter to init.pp or vhost.pp since it is a value in the directory hash. (or do I missunderstand youre statement ?)

But another thing, that I realized, is that the options are only applied for provider == Directory (templates/vhost/_directories.erb line 33) which I think is wrong (at least the Index options seem to work for provider == Location on apache but not in puppet).

@smortex

smortex commented Apr 22, 2024

Copy link
Copy Markdown
Collaborator

@smortex there is no need to add this as a parameter to init.pp or vhost.pp since it is a value in the directory hash. (or do I missunderstand youre statement ?)

I am referring to https://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexheadinsert, more specifically:

Context: server config, virtual host, directory, .htaccess

I understand that you can also set this at the vhost or server level so that you do not need to repeat the configuration for each directory. It may make sense to add another new parameter to both the apache and apache::vhost classes and the corresponding templates to allow setting this parameter at any supported location.

But another thing, that I realized, is that the options are only applied for provider == Directory (templates/vhost/_directories.erb line 33) which I think is wrong (at least the Index options seem to work for provider == Location on apache but not in puppet).

I am not sure to follow. <Location ...>, <Directory ...> etc are handled by the module through the directories parameter where each entry indicate which provider to use. It probably allows to build invalid configuration for apache that is accepted by Puppet (e.g. adding a IndexHeadInsert into a <Proxy ...>), but it goes beyond the scope of this PR and I don't think we should worry about this.

@jst-cyr

jst-cyr commented Aug 24, 2026

Copy link
Copy Markdown
Member

Hi @trefzer, my apologies that this hasn't gotten addressed yet. I've been going through older PRs, came across this one, and wanted to know if this is still a feature you are needing to be added to the apache module?

@trefzer

trefzer commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@jst-cyr of course it's still in my custom branch of this module that I use for production. So yes I appreciate merging this !

@jst-cyr

jst-cyr commented Aug 25, 2026

Copy link
Copy Markdown
Member

Thank you @trefzer , then I'll leave this PR open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants