Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sites symlinks #235

Merged
merged 4 commits into from
Jul 9, 2013
Merged

Sites symlinks #235

merged 4 commits into from
Jul 9, 2013

Conversation

hunner
Copy link
Contributor

@hunner hunner commented Jun 20, 2013

This PR has more than a few small tweaks in it, but here is the summary of each commit's outcomes:

  • Feature: Use sites-enabled and sites-available correctly on Debian (and fix mods-enabled loading)
  • Bugfix: Load vhost_alias by default if apache::vhost::virtual_docroot is passed
  • Bugfix: Correctly manage php5.conf for apache::mod::php on Debian
  • Bugfix: Correctly ensure/purge config, vhost, & mod directories before/after package installation. (Avoiding <||> because of virtual resource realization.)

The bugfixes were discovered during the introduction of this feature.

On Debian systems vhost definitions should go in sites-available and be
symlinked to from sites-enabled. apache2.conf should include
sites-enabled/*.conf. This updates the module to follow this behaviour.

Closes puppetlabs#161. Closes puppetlabs#135
In testing the sites-enabled symlinks, it was discovered that the
virtual_docroot parameter did not work on debian without also including
the vhost_alias httpd mod. This corrects that behaviour.
In testing sites-enabled behaviour, it was discovered that php loading
did not perform as expected on Debian due to including configuration
files from mods-available instead of mods-enabled. This corrects that
behaviour.
The ability to purge configs to preserve pristine working conditions is
often critical to avoid breaking apache unintentionally. On many
platforms the apache package will create directories into which other
apache mod package will place configs. These can conflict with configs
managed by puppet and cause apache service failures. This would normally
be corrected by purging those stray files on the second puppet run, but
in the mean time apache would have stopped. Single-run idempotency is
preferable.

Since Puppet cannot separately ensure => directory and purge => true,
this commit uses an exec resource and mkdir to create the directories,
and uses a file resource *after* all mods have been processed to do the
ownership & purging.
apenney added a commit that referenced this pull request Jul 9, 2013
@apenney apenney merged commit 4d24546 into puppetlabs:master Jul 9, 2013
@hunner hunner deleted the sites_symlinks branch July 9, 2013 22:29
traylenator pushed a commit to traylenator/puppetlabs-apache that referenced this pull request Jun 7, 2022
changing docker spec to alpine due to issue with init on ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants