puppetlabs / puppetlabs/puppetlabs-apache

apache::servername parameter does nothing

Open
#2,576 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Puppet
Stars
356
Forks
1.1k
Avg merge
3m
Merged PRs (30d)
1

Description

Describe the Bug

The documentation for the apache::servername directive at https://forge.puppet.com/modules/puppetlabs/apache/reference#-apache--servername (source at https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/init.pp#L307C1-L309C55) says that this "Sets the Apache server name via Apache's ServerName directive." However, the servername option is not used any further in init.pp, and in particular it does not get passed into the default or default-ssl vhosts.

Expected Behavior

The servername directive is used to set the servername directive in the default/default-ssl vhosts.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Set the servername directive, such as by
  servername => 'example.com',
  default_https_vhost => true,
}
  1. Apply the config
  2. Inspect the resulting 15-default-80.conf and 15-default-ssl-443.conf files, and see that ServerName is set to default instead of example.com

Environment

  • Version 12.1.0
  • Platform RHEL8/9

Additional Context

Changing this is going to involve some sort of breaking change, especially since the filename is set based on the servername value.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in manifests/init.pp around the documented apache::servername parameter, then trace how the default and default-ssl vhosts produce 15-default-80.conf and 15-default-ssl-443.conf. Confirm the current ServerName behavior and account for the filename compatibility concern. Done means the parameter reaches both vhosts with documented, tested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.