Compare commits
1 Commits
master
...
feature/ch
Author | SHA1 | Date |
---|---|---|
Greg | 049d5dd006 |
|
@ -0,0 +1,4 @@
|
|||
~FC007
|
||||
~FC015
|
||||
~FC023
|
||||
~FC024
|
|
@ -0,0 +1,491 @@
|
|||
apache2 Cookbook Changelog
|
||||
==========================
|
||||
This file is used to list changes made in each version of the apache2 cookbook.
|
||||
|
||||
v3.3.0 (2017-04-11)
|
||||
-------------------
|
||||
|
||||
- [GH-478] Added support for the amazon platform_family, outside of rhel
|
||||
- [GH-474] Update Berksfile to allow fetching of newer
|
||||
- [GH-473] Update copyright header format
|
||||
- [GH-472] foodcritic: add sous-chefs rules
|
||||
- add CODE_OF_CONDUCT
|
||||
- [GH-471] FCGI paths should not be messed with on RHEL/CenOS 7. CentOS 7 (and recent Fedoras) have Apache 2.4, where FCGI socket path and shared memory path is managed adequately without further involvment neccessary (subdirectory is created under /var/run/httpd).
|
||||
- [GH-470] Remove support for EOL Fedora < 18 / FreeBSD 9
|
||||
- [GH-465] Testing updates
|
||||
- [GH-469] Use the default cookbook style rules
|
||||
- [GH-460] Serverspec to InSpec migration
|
||||
- [GH-461] Update comment header format & other cookstyle fixes
|
||||
- [GH-454] Test in Travis with Chef-DK and a Rakefile
|
||||
- [GH-455] openSUSE Leap has it's own platform name
|
||||
- [GH-279] leave stubs for rhel family `conf.d` files to avoid conflicts on package upgrade; no longer remove `conf.d`, just don't use it
|
||||
- [GH-427] Add option to configure custom log level
|
||||
- [GH-450] Ensure the lock_dir is owned by www-data for Apache 2.2 and 2.4 on Debian/Ubuntu
|
||||
- Remove mod_auth_openid tests, as it is not part of the ASF release and plan to drop support for it and right now it is failing our tests
|
||||
- [GH-440] Update default values in `apache.prefork` section of README
|
||||
- [GH-443] fixed typo in copyright year
|
||||
- Test on the latest chef with chef-zero
|
||||
- Update supported platforms to Ubuntu 16.04, Debian 8.4, Centos 7.2; deprecating Ubuntu 12.04
|
||||
- [GH-422] Fix uniq for nil:NilClass error introduced in 3.2.2
|
||||
- [GH-423] allow for apache 2.4 usage on rhel < 7.0
|
||||
- Cookbook is now part of the sous-chefs, but still maintained by the same folks
|
||||
- mod_perl: No longer install libapache2-mpm-prefork
|
||||
- mod_php: renamed mod_php5 to more generic mod_php; using php 7.0 where available
|
||||
|
||||
v3.2.2 (2016-04-13)
|
||||
-------------------
|
||||
|
||||
- [GH-420] Allow auto-conversion if either of `apache.listen_ports` or `apache.listen_addresses` are set rather than '&&'. This ensures conversion occurs if only one of the two is set.
|
||||
|
||||
|
||||
v3.2.1 (2016-04-11)
|
||||
-------------------
|
||||
|
||||
- [GH-225] notify `restart` instead of `reload` service on `apache_conf`, `apache_config`
|
||||
- Update to foodcritic 6
|
||||
|
||||
v3.2.0 (2016-03-26)
|
||||
-------------------
|
||||
|
||||
- [GH-378] Deprecates `apache.listen_addresses` and `apache.listen_ports` infavor of [GH-409]
|
||||
- [GH-409] `apache.listen` now accepts an array of `addr:port` strings
|
||||
- [GH-358] FreeBSD: Update 10.1 support; Adds php 5.6 in collaboration with chef-cookbooks/php#119
|
||||
- [GH-394] Have `apache.prefork.serverlimit` set ServerLimit directive on 2.4
|
||||
- [GH-363] Escape '.' in regex for .htaccess/.htpasswd files
|
||||
- [GH-365] Force log directory creation to be recursive
|
||||
- [GH-368] Change the service creation to use the `apache.service_name` attribute throughout
|
||||
- [GH-374] Make metadata.rb compatible with chef versions < 12.
|
||||
- [GH-382] Fixed typo in node['platform_family'] for NameError in `mod_proxy_html`
|
||||
- [GH-369] README: Added on Ubuntu `mod_fastcgi` requires `multiverse` apt repository to enabled.
|
||||
- [GH-381] README: Add missing backtick
|
||||
- [GH-384] README: Fix names for a2enconf and a2disconf
|
||||
- [GH-393] README: mention availability of `mod_actions` support
|
||||
- [GH-383] Debian: Add possibility to use other releases via `apache.default_release`
|
||||
- [GH-377] Restart service when including `mod_headers` to allow healing of failed service because of missing directives.
|
||||
- [GH-416] Change the default of `apache.mod_fastcgi.install_method` to 'package' all platforms, as `source` is no longer available.
|
||||
- [GH-401] Move `mod_deflate` to `apache.default_modules` and no longer force installation on `debian` families.
|
||||
- [GH-386] Do not install an extra mod_ssl package on SUSE Linux Enterprise
|
||||
- [GH-335] Do not hardcoded reload/restart on more modern rhel platforms, allowing systemd on CentOS 7
|
||||
- [GH-375] Install package `mod_ldap` on CentOS 7 (triggered by `apache.version` == 2.4)
|
||||
- Update `apache.mod_ssl.cipher_suite` to latest from https://bettercrypto.org/
|
||||
- README: Re-organize README to make it easier to find usage and remove old references.
|
||||
- Added new standard and missing modules (Note: these may not be available natively on all operating systems)
|
||||
* [mod_http2](http://httpd.apache.org/docs/2.4/mod/mod_http2.html) - Support for the HTTP/2 transport layer. (available since 2.4.17)
|
||||
* [mod_authnz_fcgi](http://httpd.apache.org/docs/2.4/mod/mod_authnz_fcgi.html) - Enable FastCGI authorizer applications to authenticate and/or authorize clients. (available since 2.4.10)
|
||||
* [mod_cern_meta](http://httpd.apache.org/docs/2.4/mod/mod_cern_meta.html) - CERN httpd metafile semantics
|
||||
* [mod_ident](http://httpd.apache.org/docs/2.4/mod/mod_ident.html) - RFC 1413 ident lookups
|
||||
* [mod_privileges](http://httpd.apache.org/docs/2.4/mod/mod_privileges.html) - Support for Solaris privileges and for running virtual hosts under different user IDs.
|
||||
* [mod_socache_dc](http://httpd.apache.org/docs/2.4/mod/mod_socache_dc.html) - Distcache based shared object cache provider.
|
||||
* [mod_version](http://httpd.apache.org/docs/2.4/mod/mod_version.html) - Version dependent configuration
|
||||
* [mod_watchdog](http://httpd.apache.org/docs/2.4/mod/mod_watchdog.html) - Provides infrastructure for other modules to periodically run tasks
|
||||
|
||||
v3.1.0 (2015-05-25)
|
||||
-------------------
|
||||
|
||||
- [GH-315] Fix `apache.default_site_name` .conf extension references to ensure deletion
|
||||
- [GH-258] Use `apache.default_site_name` for consistency, minimize hardcoding of filenames
|
||||
- [GH-259] Add `&& sleep 1` to end of apache restart command on rhel-based systems using apache2.2
|
||||
- [GH-271] Remove FreeBSD 9.x, Red Hat and CentOS 5.x and OpenSUSE 11.x Series from tests and focus on newer releases
|
||||
- [GH-276] Add psych gem to development gems
|
||||
- [GH-293] Add `apache.mod_fastcgi.install_method` flag to allow install of mod_fastcgi from source (even on Debian family)
|
||||
- [GH-285] Made `apache.devel_package` configurable based on platform, including support for Amazon Linux.
|
||||
- [GH-316] Update Opscode references to Chef
|
||||
- [GH-318] Apply default recipe in all definitions
|
||||
- [GH-320] Add attribute to adjust `apache.default_site_port`
|
||||
- [GH-321] Fix issue with default_site name in not_if guards
|
||||
- [GH-322] Add `apache.mod_ssl.pkg_name` to allow custom mod_ssl package names. Set defaults for supported platforms including Amazon Linux
|
||||
- [GH-323] Don't create the default site configuration file in `sites-available` unless it is enabled.
|
||||
- [GH-324] Add `apache.mod_ssl.port` to set the default ssl port to something other than 443
|
||||
- [GH-328] Add the ability to pass in a pipe as to log
|
||||
- [GH-332] `SSLStrictSNIVHostCheck` is only written to config if enabled to avoid breaking apache prior to 2.2.12.
|
||||
- [GH-334] Removed `iptables`, `god-monitor`, and `logrotate` recipes to avoid having external dependencies. These services should be managed in a wrapper cookbook going forward.
|
||||
- [GH-339] Allow custom names for php so_filename (`node['apache']['mod_php5']['so_filename']`)
|
||||
|
||||
|
||||
v3.0.1 (2015-02-11)
|
||||
-------------------
|
||||
|
||||
- [GH-310] Ubuntu Apache 2.2 requires the lock_dir to be owned by www-data
|
||||
- [GH-309] Clarify that apache.version is a string
|
||||
- [GH-305] Restart service after MPM changes
|
||||
- [GH-304] Don't install systemd module on Amazon Linux
|
||||
- [GH-298] Add non-threaded MPM break notice for PHP users
|
||||
- [GH-296] Create lock_dir automatically
|
||||
|
||||
v3.0.0 (2014-11-30)
|
||||
-------------------
|
||||
Major version update because of SSL Improvements and new platform MPM and Version defaults.
|
||||
|
||||
- [GH-286] Refactor MPM and Apache version defaults: default is now apache 2.4
|
||||
- Note: set `apache.mpm` to `prefork` if you are using `mod_php` in Ubuntu >=14.04
|
||||
- [GH-281] mod_ssl: Disable SSLv3 by default to protect against POODLE attack (CVE-2014-3566)
|
||||
- [GH-280] mod_ssl: Major update with modern Cipher Suite, and best practices.
|
||||
Updated to a more modern default `apache.mod_ssl.cipher_suite`.
|
||||
Added the following additional mod_ssl attributes
|
||||
* `apache.mod_ssl.honor_cipher_order`
|
||||
* `apache.mod_ssl.insecure_renegotiation`
|
||||
* `apache.mod_ssl.strict_sni_vhost_check`
|
||||
* `apache.mod_ssl.session_cache_timeout`
|
||||
* `apache.mod_ssl.compression`
|
||||
* `apache.mod_ssl.use_stapling`
|
||||
* `apache.mod_ssl.stapling_responder_timeout`
|
||||
* `apache.mod_ssl.stapling_return_responder_errors`
|
||||
* `apache.mod_ssl.stapling_cache`
|
||||
* `apache.mod_ssl.pass_phrase_dialog`
|
||||
* `apache.mod_ssl.mutex`
|
||||
* `apache.mod_ssl.directives`
|
||||
- [GH-278] Improved chefspec tests execution time
|
||||
- [GH-277] Optimize files watching for Guard on Win32 platform
|
||||
- [GH-270] Don't attempt start until after configuration is written
|
||||
- [GH-268] Now uses chefspec 4.1
|
||||
- [GH-267] Use Supermarket as the Berkshelf 3 source
|
||||
- [GH-266] Rubocop based ruby style/syntax improvements
|
||||
- [GH-264] mod_ssl: Add new attribute for to be ready to any custom directive
|
||||
- [GH-249] Don't prepend Apache log path when requesting error logging to syslog
|
||||
- [GH-247] Explicitly include mod_ldap before mod_authnz_ldap
|
||||
- [GH-243] Expand mpm options for different distros/versions.
|
||||
- [GH-239] Added `apache.mod_php5.install_method` attribute defaults to `package`. Install packages unless PHP is compiled from source.
|
||||
- OneHealth Solutions was acquired by Viverae
|
||||
- Remove ArchLinux pacman as a dependency and handle similar to apt, yum, zypper
|
||||
- Adjust ubuntu apache 2.4 docroot_dir to match package (from /var/www to /var/www/html)
|
||||
- [GH-238] Bump service config syntax check guard timeout to 10 seconds
|
||||
- [GH-235] Removed `apache2::mpm_itk` which is not part of core and therefore should be its own cookbook
|
||||
- [GH-234] /var/run/httpd/mod_fcgid directory now belongs to apache on Fedora/RHEL systems.
|
||||
- [GH-233] Default web_app template should return 503 status code when maintenance file is present
|
||||
- [GH-232] Cookbook now deletes a2* if they are symlinks before dropping template versions
|
||||
- [GH-222] Set TraceEnable to off by default.
|
||||
- [GH-213] Adjust chefspec to use the package resource on FreeBSD (previously freebsd_package)
|
||||
- [GH-212] New attribute apache.locale which sets LANG. defaults to 'C'
|
||||
- [GH-210] Clarify web_app definition usage around configuration templates.
|
||||
- [GH-208] `apache_conf` now accepts `source` and `cookbook` parameters.
|
||||
|
||||
v2.0.0 (2014-08-06)
|
||||
--------------------
|
||||
Major version update because of major overhaul to support Apache 2.4 and a2enconf and a2endisconf changes.
|
||||
|
||||
- [GH-204] mod_auth_openid: Added `apache.mod_auth_openid.version` attribute
|
||||
- FreeBSD support has been improved with the release of chef 11.14.2, portsnap is no longer used in favor of pkgng.
|
||||
- [GH-157] - Apache will only be started when a configuration test passes, this allows the chef run to fix any broken configuration without failing the chef run.
|
||||
- `apache.log_dir` directory is now 0755 on all platforms (including the debian platform family)
|
||||
- [GH-166, GH-173] - `conf.d` is no longer used and replaced by `conf-available` and `conf-enabled` managed via the `a2enconf` and `a2disconf` scripts
|
||||
- [GH-166, GH-173] - All configuration files need to end in `.conf` for them to be loaded
|
||||
- [GH-173] - Perl is a required package on all platforms to support the a2* scripts as we now use the debian versions directly.
|
||||
- [GH-193] - per MPM settings: `maxclients` is now `maxrequestworkers`
|
||||
- [GH-194] - per MPM settings: `maxrequestsperchild` is now `maxconnectionsperchild`
|
||||
- [GH-161] - Added support for CentOS 7
|
||||
- [GH-180] - Improved SuSE support
|
||||
- [GH-100] - Apache HTTP 2.4 support
|
||||
This provides Apache 2.4 support in a backwards compatible way.
|
||||
It adds the following new attributes:
|
||||
- `apache.version` - This defaults to `2.2` and if changed to `2.4`; it triggers and assumes 2.4 packages will be installed.
|
||||
- `apache.mpm` - In 2.4 mode, this specifies which mpm to install. Default is `prefork`.
|
||||
- `apache.run_dir`
|
||||
- `apache.lock_dir`
|
||||
- `apache.libexec_dir` replaces `apache.libexecdir`
|
||||
- `apache.prefork.maxrequestworkers` replaces `apache.prefork.maxclients`
|
||||
- `apache.prefork.maxconnectionsperchild` replaces `apache.prefork.maxrequestsperchild`
|
||||
- `apache.worker.threadlimit`
|
||||
- `apache.worker.maxrequestworkers` replaces `apache.worker.maxclients`
|
||||
- `apache.worker.maxconnectionsperchild `replaces `apache.worker.maxrequestsperchild`
|
||||
- `apache.event.startservers`
|
||||
- `apache.event.serverlimit`
|
||||
- `apache.event.minsparethreads`
|
||||
- `apache.event.maxsparethreads`
|
||||
- `apache.event.threadlimit`
|
||||
- `apache.event.threadsperchild`
|
||||
- `apache.event.maxrequestworkers`
|
||||
- `apache.event.maxconnectionsperchild`
|
||||
- `apache.itk.startservers`
|
||||
- `apache.itk.minspareservers`
|
||||
- `apache.itk.maxspareservers`
|
||||
- `apache.itk.maxrequestworkers`
|
||||
- `apache.itk.maxconnectionsperchild`
|
||||
|
||||
Apache 2.4 Upgrade Notes:
|
||||
|
||||
Since the changes between apache 2.2 and apache 2.4 are pretty significant, we are unable to account for all changes needed for your upgrade. Please take a moment to familiarize yourself with the Apache Software Foundation provided upgrade documentation before attempting to use this cookbook with apache 2.4. See http://httpd.apache.org/docs/current/upgrading.html
|
||||
|
||||
- This cookbook does not automatically specify which version of apache to install. We are at the mercy of the `package` provider. It is important, however, to make sure that you configure the `apache.version` attribute to match. For your convenience, we try to set reasonable defaults based on different platforms in our test suite.
|
||||
- `mod_proxy` - In 2.4 mode, `apache.proxy.order`, `apache.proxy.deny_from`, `apache.proxy.allow_from` are ignored, as the attributes can not be supported in a backwards compatible way. Please use `apache.proxy.require` instead.
|
||||
|
||||
v1.11.0 (2014-07-25)
|
||||
--------------------
|
||||
- [GH-152] - Checking if server_aliases is defined in example
|
||||
- [GH-106] - Only turn rewrite on once in web_app.conf.erb
|
||||
- [GH-156] - Correct mod_basic/digest recipe names in README
|
||||
- Recipe iptables now includes the iptables::default recipe
|
||||
- Upgrade test-kitchen to latest version
|
||||
- Replaced minitest integration tests with serverspec tests
|
||||
- Added chefspec tests
|
||||
|
||||
|
||||
v1.10.4 (2014-04-23)
|
||||
--------------------
|
||||
- [COOK-4249] mod_proxy_http requires mod_proxy
|
||||
|
||||
|
||||
v1.10.2 (2014-04-09)
|
||||
--------------------
|
||||
- [COOK-4490] - Fix minitest `apache_configured_ports` helper
|
||||
- [COOK-4491] - Fix minitest: escape regex interpolation
|
||||
- [COOK-4492] - Fix service[apache2] CHEF-3694 duplication
|
||||
- [COOK-4493] - Fix template[ports.conf] CHEF-3694 duplication
|
||||
|
||||
As of 2014-04-04 and per [Community Cookbook Diversification](https://wiki.chef.io/display/chef/Community+Cookbook+Diversification) this cookbook now maintained by OneHealth Solutions. Please be patient as we get into the swing of things.
|
||||
|
||||
v1.10.0 (2014-03-28)
|
||||
--------------------
|
||||
- [COOK-3990] - Fix minitest failures on EL5
|
||||
- [COOK-4416] - Support the ability to point to local apache configs
|
||||
- [COOK-4469] - Use reload instead of restart on RHEL
|
||||
|
||||
|
||||
v1.9.6 (2014-02-28)
|
||||
-------------------
|
||||
[COOK-4391] - uncommenting the PIDFILE line
|
||||
|
||||
|
||||
v1.9.4 (2014-02-27)
|
||||
-------------------
|
||||
Bumping version for toolchain
|
||||
|
||||
|
||||
v1.9.1 (2014-02-27)
|
||||
-------------------
|
||||
[COOK-4348] Allow arbitrary params in sysconfig
|
||||
|
||||
|
||||
v1.9.0 (2014-02-21)
|
||||
-------------------
|
||||
### Improvement
|
||||
- **[COOK-4076](https://tickets.chef.io/browse/COOK-4076)** - foodcritic: dependencies are not defined properly
|
||||
- **[COOK-2572](https://tickets.chef.io/browse/COOK-2572)** - Add mod_pagespeed recipe to apache2
|
||||
|
||||
### Bug
|
||||
- **[COOK-4043](https://tickets.chef.io/browse/COOK-4043)** - apache2 cookbook does not depend on 'iptables'
|
||||
- **[COOK-3919](https://tickets.chef.io/browse/COOK-3919)** - Move the default pidfile for apache2 on Ubuntu 13.10 or greater
|
||||
- **[COOK-3863](https://tickets.chef.io/browse/COOK-3863)** - Add recipe for mod_jk
|
||||
- **[COOK-3804](https://tickets.chef.io/browse/COOK-3804)** - Fix incorrect datatype for apache/default_modules, use recipes option in metadata
|
||||
- **[COOK-3800](https://tickets.chef.io/browse/COOK-3800)** - Cannot load modules that use non-standard module identifiers
|
||||
- **[COOK-1689](https://tickets.chef.io/browse/COOK-1689)** - The perl package name should be configurable
|
||||
|
||||
|
||||
v1.8.14
|
||||
-------
|
||||
Version bump for toolchain sanity
|
||||
|
||||
|
||||
v1.8.12
|
||||
-------
|
||||
Fixing various style issues for travis
|
||||
|
||||
|
||||
v1.8.10
|
||||
-------
|
||||
fixing metadata version error. locking to 3.0"
|
||||
|
||||
|
||||
v1.8.8
|
||||
------
|
||||
Version bump for toolchain sanity
|
||||
|
||||
|
||||
v1.8.6
|
||||
------
|
||||
Locking yum dependency to '< 3'
|
||||
|
||||
|
||||
v1.8.4
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3769](https://tickets.chef.io/browse/COOK-3769)** - Fix a critical bug where the `apache_module` could not enable modules
|
||||
|
||||
|
||||
v1.8.2
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3766](https://tickets.chef.io/browse/COOK-3766)** - Fix an issue where the `mod_ssl` recipe fails due to a missing attribute
|
||||
|
||||
|
||||
v1.8.0
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3680](https://tickets.chef.io/browse/COOK-3680)** - Update template paths
|
||||
- **[COOK-3570](https://tickets.chef.io/browse/COOK-3570)** - Apache cookbook breaks on RHEL / CentOS 6
|
||||
- **[COOK-2944](https://tickets.chef.io/browse/COOK-2944)** - Fix foodcritic failures
|
||||
- **[COOK-2893](https://tickets.chef.io/browse/COOK-2893)** - Improve mod_auth_openid recipe with guards and idempotency
|
||||
- **[COOK-2758](https://tickets.chef.io/browse/COOK-2758)** - Fix use of non-existent attribute
|
||||
|
||||
### New Feature
|
||||
- **[COOK-3665](https://tickets.chef.io/browse/COOK-3665)** - Add recipe for mod_userdir
|
||||
- **[COOK-3646](https://tickets.chef.io/browse/COOK-3646)** - Add recipe for mod_cloudflare
|
||||
- **[COOK-3213](https://tickets.chef.io/browse/COOK-3213)** - Add recipe for mod_info
|
||||
|
||||
### Improvement
|
||||
- **[COOK-3656](https://tickets.chef.io/browse/COOK-3656)** - Parameterize apache2 binary
|
||||
- **[COOK-3562](https://tickets.chef.io/browse/COOK-3562)** - Allow mod_proxy settings to be configured as attributes
|
||||
- **[COOK-3326](https://tickets.chef.io/browse/COOK-3326)** - Fix default_test to use ServerTokens attribute
|
||||
- **[COOK-2635](https://tickets.chef.io/browse/COOK-2635)** - Add support for SVG mime types
|
||||
- **[COOK-2598](https://tickets.chef.io/browse/COOK-2598)** - FastCGI Module only works on Debian-based platforms
|
||||
- **[COOK-1984](https://tickets.chef.io/browse/COOK-1984)** - Add option to configure the address apache listens to
|
||||
|
||||
|
||||
v1.7.0
|
||||
------
|
||||
### Improvement
|
||||
|
||||
- [COOK-3073]: make access.log location configurable per-platform
|
||||
- [COOK-3074]: don't hardcode the error.log location in the default site config
|
||||
- [COOK-3268]: don't hardcode DocumentRoot and cgi-bin locations in `default_site`
|
||||
|
||||
### New Feature
|
||||
|
||||
- [COOK-3184]: Add `mod_filter` recipe to Apache2-cookbook
|
||||
- [COOK-3236]: Add `mod_action` recipe to Apache2-cookbook
|
||||
|
||||
v1.6.6
|
||||
------
|
||||
1.6.4 had a missed step in the automated release, long live 1.6.6.
|
||||
|
||||
### Bug
|
||||
|
||||
- [COOK-3018]: apache2_module does duplicate delayed restart of apache2 service when conf = true
|
||||
- [COOK-3027]: Default site enable true, then false, does not disable default site
|
||||
- [COOK-3109]: fix apache lib_dir arch attribute regexp
|
||||
|
||||
v1.6.2
|
||||
------
|
||||
- [COOK-2535] - `mod_auth_openid` requires libtool to run autogen.sh
|
||||
- [COOK-2667] - Typo in usage documentation
|
||||
- [COOK-2461] - `apache2::mod_auth_openid` fails on some ubuntu systems
|
||||
- [COOK-2720] - Apache2 minitest helper function `ran_recipe` is not portable
|
||||
|
||||
v1.6.0
|
||||
------
|
||||
- [COOK-2372] - apache2 mpm_worker: add ServerLimit attribute (default to 16)
|
||||
|
||||
v1.5.0
|
||||
------
|
||||
The `mod_auth_openid` attributes are changed. The upstream maintainer deprecated the older release versions, and the source repository has releases available at specific SHA1SUM references. The new attribute, `node['apache']['mod_auth_openid']['ref']` is used to set this.
|
||||
|
||||
- [COOK-2198] - `apache::mod_auth_openid` compiles from source, but does not install make on debian/ubuntu
|
||||
- [COOK-2224] - version conflict between cucumber and other gems
|
||||
- [COOK-2248] - `apache2::mod_php5` uses `not_if` "which php" without ensuring package 'which' is installed
|
||||
- [COOK-2269] - Set allow list for mod_status incase external monitor scripts need
|
||||
- [COOK-2276] - cookbook apache2 documentation regarding listening ports doesn't match default attributes
|
||||
- [COOK-2296] - `mod_auth_openid` doesn't have tags/releases for the version I need for features and fixes
|
||||
- [COOK-2323] - Add Oracle linux support
|
||||
|
||||
v1.4.2
|
||||
------
|
||||
- [COOK-1721] - fix logrotate recipe
|
||||
|
||||
v1.4.0
|
||||
------
|
||||
- [COOK-1456] - iptables enhancements
|
||||
- [COOK-1473] - apache2 does not disable default site when setting "`default_site_enabled`" back to false
|
||||
- [COOK-1824] - the apache2 cookbook needs to specify which binary is used on rhel platform
|
||||
- [COOK-1916] - Download location wrong for apache2 `mod_auth_openid` >= 0.7
|
||||
- [COOK-1917] - Improve `mod_auth_openid` recipe to handle module upgrade more gracefully
|
||||
- [COOK-2029] - apache2 restarts on every run on RHEL and friends, generate-module-list on every run.
|
||||
- [COOK-2036] - apache2: Cookbook style
|
||||
|
||||
v1.3.2
|
||||
------
|
||||
- [COOK-1804] - fix `web_app` definition parameter so site can be disabled.
|
||||
|
||||
v1.3.0
|
||||
------
|
||||
- [COOK-1738] - Better configuration for `mod_include` and some overrides in `web_app` definition
|
||||
- [COOK-1470] - Change SSL Ciphers to Mitigate BEAST attack
|
||||
|
||||
v1.2.0
|
||||
------
|
||||
- [COOK-692] - delete package conf.d files in module recipes, for EL
|
||||
- [COOK-1693] - Foodcritic finding for unnecessary string interpolation
|
||||
- [COOK-1757] - platform_family and better style / usage practices
|
||||
|
||||
v1.1.16
|
||||
-------
|
||||
re-releasing as .16 due to error on tag 1.1.14
|
||||
|
||||
- [COOK-1466] - add `mod_auth_cas` recipe
|
||||
- [COOK-1609] - apache2 changes ports.conf twice per run when using apache2::mod_ssl
|
||||
|
||||
v1.1.12
|
||||
-------
|
||||
- [COOK-1436] - restore apache2 web_app definition
|
||||
- [COOK-1356] - allow ExtendedStatus via attribute
|
||||
- [COOK-1403] - add mod_fastcgi recipe
|
||||
|
||||
v1.1.10
|
||||
-------
|
||||
- [COOK-1315] - allow the default site to not be enabled
|
||||
- [COOK-1328] - cookbook tests (minitest, cucumber)
|
||||
|
||||
v1.1.8
|
||||
------
|
||||
- Some platforms with minimal installations that don't have perl won't have a `node['languages']['perl']` attribute, so remove the conditional and rely on the power of idempotence in the package resource.
|
||||
- [COOK-1214] - address foodcritic warnings
|
||||
- [COOK-1180] - add `mod_logio` and fix `mod_proxy`
|
||||
|
||||
v1.1.6
|
||||
------
|
||||
FreeBSD users: This release requires the `freebsd` cookbook. See README.md.
|
||||
|
||||
- [COOK-1025] - freebsd support in mod_php5 recipe
|
||||
|
||||
v1.1.4
|
||||
------
|
||||
- [COOK-1100] - support amazon linux
|
||||
|
||||
v1.1.2
|
||||
------
|
||||
- [COOK-996] - apache2::mod_php5 can cause PHP and module API mismatches
|
||||
- [COOK-1083] - return string for v_f_p and use correct value for default
|
||||
|
||||
v1.1.0
|
||||
------
|
||||
- [COOK-861] - Add `mod_perl` and apreq2
|
||||
- [COOK-941] - fix `mod_auth_openid` on FreeBSD
|
||||
- [COOK-1021] - add a commented-out LoadModule directive to keep apxs happy
|
||||
- [COOK-1022] - consistency for icondir attribute
|
||||
- [COOK-1023] - fix platform test for attributes
|
||||
- [COOK-1024] - fix a2enmod script so it runs cleanly on !bash
|
||||
- [COOK-1026] - fix `error_log` location on FreeBSD
|
||||
|
||||
v1.0.8
|
||||
------
|
||||
- COOK-548 - directory resource doesn't have backup parameter
|
||||
|
||||
v1.0.6
|
||||
------
|
||||
- COOK-915 - update to `mod_auth_openid` version 0.6, see __Recipes/mod_auth_openid__ below.
|
||||
- COOK-548 - Add support for FreeBSD.
|
||||
|
||||
v1.0.4
|
||||
------
|
||||
- COOK-859 - don't hardcode module paths
|
||||
|
||||
v1.0.2
|
||||
------
|
||||
- Tickets resolved in this release: COOK-788, COOK-782, COOK-780
|
||||
|
||||
v1.0.0
|
||||
------
|
||||
- Red Hat family support is greatly improved, all recipes except `god_monitor` converge.
|
||||
- Recipe `mod_auth_openid` now works on RHEL family distros
|
||||
- Recipe `mod_php5` will now remove config from package on RHEL family so it doesn't conflict with the cookbook's.
|
||||
- Added `php5.conf.erb` template for `mod_php5` recipe.
|
||||
- Create the run state directory for `mod_fcgid` to prevent a startup error on RHEL version 6.
|
||||
- New attribute `node['apache']['lib_dir']` to handle lib vs lib64 on RHEL family distributions.
|
||||
- New attribute `node['apache']['group']`.
|
||||
- Scientific Linux support added.
|
||||
- Use a file resource instead of the generate-module-list executed perl script on RHEL family.
|
||||
- "default" site can now be disabled.
|
||||
- web_app now has an "enable" parameter.
|
||||
- Support for dav_fs apache module.
|
||||
- Tickets resolved in this release: COOK-754, COOK-753, COOK-665, COOK-624, COOK-579, COOK-519, COOK-518
|
||||
- Fix node references in template for a2dissite
|
||||
- Use proper user and group attributes on files and templates.
|
||||
- Replace the anemic README.rdoc with this new and improved superpowered README.md :).
|
|
@ -0,0 +1,105 @@
|
|||
# Contributing to the apache2 cookbook
|
||||
|
||||
We are glad you want to contribute to the apache2 cookbook! The first
|
||||
step is the desire to improve the project.
|
||||
|
||||
## Quick-contribute
|
||||
|
||||
* Create an issue on the github [issue tracker](https://github.com/sous-chefs/apache2/issues)
|
||||
* Link to your patch as a rebased git branch or pull request from the ticket
|
||||
|
||||
We regularly review contributions and will get back to you if we have
|
||||
any suggestions or concerns.
|
||||
|
||||
### Branches and Commits
|
||||
|
||||
You should submit your patch as a git branch named after the change.
|
||||
|
||||
It is a best practice to have your commit message have a _summary
|
||||
line_, followed by an empty line and then a brief description of
|
||||
the commit. This also helps other contributors understand the
|
||||
purpose of changes to the code.
|
||||
|
||||
Remember that not all users use Chef in the same way or on the same
|
||||
operating systems as you, so it is helpful to be clear about your use
|
||||
case and change so they can understand it even when it doesn't apply
|
||||
to them.
|
||||
|
||||
### Github and Pull Requests
|
||||
|
||||
We don't require you to use Github, and we will even take patch diffs
|
||||
attached to tickets on the issue tracker. However Github has a lot of
|
||||
convenient features, such as being able to see a diff of changes
|
||||
between a pull request and the main repository quickly without
|
||||
downloading the branch.
|
||||
|
||||
## Functional and Unit Tests
|
||||
|
||||
This cookbook is set up to run tests under
|
||||
[Test Kitchen](http://kitchen.ci/). It uses serverspec to run
|
||||
integration tests after the node has been converged to verify that
|
||||
the state of the node.
|
||||
|
||||
Test kitchen should run completely without exception using the default
|
||||
[baseboxes provided by Chef](http://chef.github.io/bento/).
|
||||
Because Test Kitchen creates VirtualBox machines and runs through
|
||||
every configuration in the .kitchen.yml file, it may take some time for
|
||||
these tests to complete.
|
||||
|
||||
If your changes are only for a specific recipe, run only its
|
||||
configuration with Test Kitchen. If you are adding a new recipe, or
|
||||
other functionality such as a LWRP or definition, please add
|
||||
appropriate tests and ensure they run with Test Kitchen.
|
||||
|
||||
If any don't pass, investigate them before submitting your patch.
|
||||
|
||||
Any new feature should have unit tests included with the patch with
|
||||
good code coverage to help protect it from future changes. Similarly,
|
||||
patches that fix a bug or regression should have a _regression test_.
|
||||
Simply put, this is a test that would fail without your patch but
|
||||
passes with it. The goal is to ensure this bug doesn't regress in the
|
||||
future. Consider a regular expression that doesn't match a certain
|
||||
pattern that it should, so you provide a patch and a test to ensure
|
||||
that the part of the code that uses this regular expression works as
|
||||
expected. Later another contributor may modify this regular expression
|
||||
in a way that breaks your use cases. The test you wrote will fail,
|
||||
signalling to them to research your ticket and use case and accounting
|
||||
for it.
|
||||
|
||||
If you need help writing tests, please ask on the Chef Developer's
|
||||
mailing list, or https://community-slack.chef.io/
|
||||
|
||||
## Cookbook Contribution Do's and Don't's
|
||||
|
||||
Please do include tests for your contribution. If you need help, ask
|
||||
on the
|
||||
[chef-dev mailing list](http://lists.chef.io/sympa/info/chef-dev)
|
||||
or the https://community-slack.chef.io/
|
||||
|
||||
Not all platforms that a cookbook supports may be supported by Test
|
||||
Kitchen. Please provide evidence of testing your contribution if it
|
||||
isn't trivial so we don't have to duplicate effort in testing. Chef
|
||||
10.14+ "doc" formatted output is sufficient.
|
||||
|
||||
Please do indicate new platform (families) or platform versions in the
|
||||
commit message, and update the relevant ticket. If a contribution adds
|
||||
new platforms or platform versions, indicate such in the body of the commit message(s).
|
||||
|
||||
Please do use [foodcritic](http://www.foodcritic.io/) to
|
||||
lint-check the cookbook. Except FC007, it should pass all correctness
|
||||
rules. FC007 is okay as long as the dependent cookbooks are *required*
|
||||
for the default behavior of the cookbook, such as to support an
|
||||
uncommon platform, secondary recipe, etc.
|
||||
|
||||
Please do ensure that your changes do not break or modify behavior for
|
||||
other platforms supported by the cookbook. For example if your changes
|
||||
are for Debian, make sure that they do not break on CentOS.
|
||||
|
||||
Please do not modify the version number in the metadata.rb, the maintainer
|
||||
will select the appropriate version based on the release cycle
|
||||
information above.
|
||||
|
||||
Please do not update the CHANGELOG.md for a new version. Not all
|
||||
changes to a cookbook may be merged and released in the same versions.
|
||||
We will update the CHANGELOG.md when releasing a new version of
|
||||
the cookbook.
|
|
@ -0,0 +1,693 @@
|
|||
apache2 Cookbook
|
||||
================
|
||||
[![Cookbook Version](https://img.shields.io/cookbook/v/apache2.svg?style=flat)](https://supermarket.chef.io/cookbooks/apache2)
|
||||
[![Build Status](https://travis-ci.org/sous-chefs/apache2.svg?branch=master)](https://travis-ci.org/sous-chefs/apache2)
|
||||
[![Dependency Status](http://img.shields.io/gemnasium/sous-chefs/apache2.svg?style=flat)](https://gemnasium.com/sous-chefs/apache2)
|
||||
[![License](https://img.shields.io/badge/license-Apache_2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
This cookbook provides a complete Debian/Ubuntu style Apache HTTPD
|
||||
configuration. Non-Debian based distributions such as Red Hat/CentOS,
|
||||
ArchLinux and others supported by this cookbook will have a
|
||||
configuration that mimics Debian/Ubuntu style as it is easier to
|
||||
manage with Chef.
|
||||
|
||||
Debian-style Apache configuration uses scripts to manage modules and
|
||||
sites (vhosts). The scripts are:
|
||||
|
||||
* a2ensite
|
||||
* a2dissite
|
||||
* a2enmod
|
||||
* a2dismod
|
||||
* a2enconf
|
||||
* a2disconf
|
||||
|
||||
This cookbook ships with templates of these scripts for non
|
||||
Debian/Ubuntu platforms. The scripts are used in the __Definitions__
|
||||
below.
|
||||
|
||||
## Cookbooks:
|
||||
|
||||
This cookbook has no direct external dependencies.
|
||||
|
||||
Depending on your OS configuration and security policy, you may need
|
||||
additional recipes or cookbooks for this cookbook's recipes to
|
||||
converge on the node. In particular, the following Operating System
|
||||
settings may affect the behavior of this cookbook:
|
||||
|
||||
* apt cache outdated
|
||||
* SELinux enabled
|
||||
* firewalls (such as iptables, ufw, etc.)
|
||||
* Compile tools
|
||||
* 3rd party repositories
|
||||
|
||||
On Ubuntu/Debian, use [apt](https://supermarket.chef.io/cookbooks/apt) cookbook to ensure the package
|
||||
cache is updated so Chef can install packages, or consider putting
|
||||
apt-get in your bootstrap process or
|
||||
[knife bootstrap template](http://docs.chef.io/knife_bootstrap.html)
|
||||
|
||||
On RHEL, SELinux is enabled by default. The [selinux](https://supermarket.chef.io/cookbooks/selinux) cookbook
|
||||
contains a `permissive` recipe that can be used to set SELinux to
|
||||
"Permissive" state. Otherwise, additional recipes need to be created
|
||||
by the user to address SELinux permissions.
|
||||
|
||||
|
||||
To deal with firewalls Chef Software does provide an [iptables](https://supermarket.chef.io/cookbooks/iptables) and [ufw](https://supermarket.chef.io/cookbooks/ufw) cookbook but is migrating from the approach used there to a more robust solution
|
||||
utilizing the general [firewall](https://supermarket.chef.io/cookbooks/firewall) cookbook to setup rules.
|
||||
See those cookbooks' READMEs for documentation.
|
||||
|
||||
Build/compile tools may not be installed on the system by default.
|
||||
Some recipes (e.g., `apache2::mod_auth_openid`) build the module from
|
||||
source. Use the [build-essential](https://supermarket.chef.io/cookbooks/build-essential) cookbook to get essential
|
||||
build packages installed.
|
||||
|
||||
On ArchLinux, if you are using the `apache2::mod_auth_openid` recipe,
|
||||
you also need the [pacman](https://supermarket.chef.io/cookbooks/pacman) cookbook for the `pacman_aur` LWRP. Put
|
||||
`recipe[pacman]` on the node's expanded run list (on the node or in a
|
||||
role). This is not an explicit dependency because it is only required
|
||||
for this single recipe and platform; the pacman default recipe
|
||||
performs `pacman -Sy` to keep pacman's package cache updated.
|
||||
|
||||
## Platforms:
|
||||
|
||||
The following platforms and versions are tested and supported using
|
||||
[test-kitchen](http://kitchen.ci/)
|
||||
|
||||
* Ubuntu 14.04
|
||||
* Ubuntu 16.04
|
||||
* Debian 8.6
|
||||
* CentOS 7.3
|
||||
* Fedora 25
|
||||
|
||||
The following platform families are supported in the code, and are
|
||||
assumed to work based on the successful testing on Ubuntu and CentOS.
|
||||
|
||||
* Red Hat (rhel)
|
||||
|
||||
The following platforms are also supported in the code, have been
|
||||
tested manually but are not regularly tested under test-kitchen.
|
||||
|
||||
* Amazon Linux
|
||||
* SUSE/OpenSUSE
|
||||
* ArchLinux
|
||||
* FreeBSD
|
||||
|
||||
### Notes for RHEL Family:
|
||||
|
||||
On Red Hat Enterprise Linux and derivatives, the EPEL repository may
|
||||
be necessary to install packages used in certain recipes. The
|
||||
`apache2::default` recipe, however, does not require any additional
|
||||
repositories. The [yum-epel](https://supermarket.chef.io/cookbooks/yum-epel) cookbook can be used to add the
|
||||
EPEL repository. See __Examples__ for more information.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Using this cookbook is relatively straightforward. It is recommended to create
|
||||
a project or organization specific [wrapper cookbook](https://www.chef.io/blog/2013/12/03/doing-wrapper-cookbooks-right/)
|
||||
and add the desired recipes to the run list of a node, or create a role. Depending on your
|
||||
environment, you may have multiple roles that use different recipes
|
||||
from this cookbook. Adjust any attributes as desired. For example, to
|
||||
create a basic role for web servers that provide both HTTP and HTTPS:
|
||||
|
||||
```ruby
|
||||
% cat roles/webserver.rb
|
||||
name "webserver"
|
||||
description "Systems that serve HTTP and HTTPS"
|
||||
run_list(
|
||||
"recipe[apache2]",
|
||||
"recipe[apache2::mod_ssl]"
|
||||
)
|
||||
default_attributes(
|
||||
"apache" => {
|
||||
"listen" => ["*:80", "*:443"]
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
For examples of using the definitions in your own recipes, see their
|
||||
respective sections below.
|
||||
|
||||
|
||||
Attributes
|
||||
==========
|
||||
|
||||
This cookbook uses many attributes, broken up into a few different
|
||||
kinds.
|
||||
|
||||
Platform specific
|
||||
-----------------
|
||||
|
||||
In order to support the broadest number of platforms, several
|
||||
attributes are determined based on the node's platform. See the
|
||||
attributes/default.rb file for default values in the case statement at
|
||||
the top of the file.
|
||||
|
||||
* `node['apache']['package']` - Package name for Apache2
|
||||
* `node['apache']['perl_pkg']` - Package name for Perl
|
||||
* `node['apache']['dir']` - Location for the Apache configuration
|
||||
* `node['apache']['log_dir']` - Location for Apache logs
|
||||
* `node['apache']['error_log']` - Location for the default error log
|
||||
* `node['apache']['access_log']` - Location for the default access log
|
||||
* `node['apache']['user']` - User Apache runs as
|
||||
* `node['apache']['group']` - Group Apache runs as
|
||||
* `node['apache']['binary']` - Apache httpd server daemon
|
||||
* `node['apache']['conf_dir']` - Location for the main config file (e.g apache2.conf or httpd.conf)
|
||||
* `node['apache']['docroot_dir']` - Location for docroot
|
||||
* `node['apache']['cgibin_dir']` - Location for cgi-bin
|
||||
* `node['apache']['icondir']` - Location for icons
|
||||
* `node['apache']['cache_dir']` - Location for cached files used by Apache itself or recipes
|
||||
* `node['apache']['pid_file']` - Location of the PID file for Apache httpd
|
||||
* `node['apache']['lib_dir']` - Location for shared libraries
|
||||
* `node['apache']['default_site_enabled']` - Default site enabled. Default is false.
|
||||
* `node['apache']['ext_status']` - if true, enables ExtendedStatus for `mod_status`
|
||||
* `node['apache']['locale']` - Locale to set in sysconfig or envvars and used for subprocesses and modules (like mod_dav and mod_wsgi). On debian systems Uses system-local if set to 'system', defaults to 'C'.
|
||||
|
||||
General settings
|
||||
----------------
|
||||
|
||||
These are general settings used in recipes and templates. Default
|
||||
values are noted.
|
||||
|
||||
* `node['apache']['version']` - Specifing 2.4 triggers apache 2.4 support. If the platform is known during our test to install 2.4 by default, it will be set to 2.4 for you. Otherwise it falls back to 2.2. This value should be specified as a string.
|
||||
* `node['apache']['listen']` - Array of address:port combinations that httpd should listen on. Default is any address and port 80 (`["*:80"]`).
|
||||
* `node['apache']['contact']` - Value for ServerAdmin directive. Default "ops@example.com".
|
||||
* `node['apache']['timeout']` - Value for the Timeout directive. Default is 300.
|
||||
* `node['apache']['keepalive']` - Value for the KeepAlive directive. Default is On.
|
||||
* `node['apache']['keepaliverequests']` - Value for MaxKeepAliveRequests. Default is 100.
|
||||
* `node['apache']['keepalivetimeout']` - Value for the KeepAliveTimeout directive. Default is 5.
|
||||
* `node['apache']['sysconfig_additional_params']` - Additionals variables set in sysconfig file. Default is empty.
|
||||
* `node['apache']['log_level']` - Value for LogLevel directive. Default is 'warn'.
|
||||
* `node['apache']['default_modules']` - Array of module names. Can take "mod_FOO" or "FOO" as names, where FOO is the apache module, e.g. "`mod_status`" or "`status`".
|
||||
* `node['apache']['mpm']` - With apache.version 2.4, specifies what Multi-Processing Module to enable. Defaults to platform default, otherwise it is "prefork"
|
||||
|
||||
The modules listed in `default_modules` will be included as recipes in `recipe[apache::default]`.
|
||||
|
||||
Prefork attributes
|
||||
------------------
|
||||
|
||||
Prefork attributes are used for tuning the Apache HTTPD [prefork MPM](http://httpd.apache.org/docs/current/mod/prefork.html) configuration.
|
||||
|
||||
* `node['apache']['prefork']['startservers']` - initial number of server processes to start. Default is 16.
|
||||
* `node['apache']['prefork']['minspareservers']` - minimum number of spare server processes. Default 16.
|
||||
* `node['apache']['prefork']['maxspareservers']` - maximum number of spare server processes. Default 32.
|
||||
* `node['apache']['prefork']['serverlimit']` - upper limit on configurable server processes. Default 256.
|
||||
* `node['apache']['prefork']['maxrequestworkers']` - Maximum number of connections that will be processed simultaneously. Default 256.
|
||||
* `node['apache']['prefork']['maxconnectionsperchild']` - Maximum number of request a child process will handle. Default 10000.
|
||||
|
||||
Worker attributes
|
||||
-----------------
|
||||
|
||||
Worker attributes are used for tuning the Apache HTTPD [worker MPM](http://httpd.apache.org/docs/current/mod/worker.html)
|
||||
configuration.
|
||||
|
||||
* `node['apache']['worker']['startservers']` - Initial number of server processes to start. Default 4
|
||||
* `node['apache']['worker']['serverlimit']` - Upper limit on configurable server processes. Default 16.
|
||||
* `node['apache']['worker']['minsparethreads']` - Minimum number of spare worker threads. Default 64
|
||||
* `node['apache']['worker']['maxsparethreads']` - Maximum number of spare worker threads. Default 192.
|
||||
* `node['apache']['worker']['maxrequestworkers']` - Maximum number of simultaneous connections. Default 1024.
|
||||
* `node['apache']['worker']['maxconnectionsperchild']` - Limit on the number of connections that an individual child server will handle during its life.
|
||||
|
||||
Event attributes
|
||||
----------------
|
||||
|
||||
Event attributes are used for tuning the Apache HTTPD [event MPM](http://httpd.apache.org/docs/current/mod/event.html)
|
||||
configuration.
|
||||
|
||||
* `node['apache']['event']['startservers']` - Initial number of child server processes created at startup. Default 4.
|
||||
* `node['apache']['event']['serverlimit']` - Upper limit on configurable number of processes. Default 16.
|
||||
* `node['apache']['event']['minsparethreads']` - Minimum number of spare worker threads. Default 64
|
||||
* `node['apache']['event']['maxsparethreads']` - Maximum number of spare worker threads. Default 192.
|
||||
* `node['apache']['event']['threadlimit']` - Upper limit on the configurable number of threads per child process. Default 192.
|
||||
* `node['apache']['event']['threadsperchild']` - Number of threads created by each child process. Default 64.
|
||||
* `node['apache']['event']['maxrequestworkers']` - Maximum number of connections that will be processed simultaneously.
|
||||
* `node['apache']['event']['maxconnectionsperchild']` - Limit on the number of connections that an individual child server will handle during its life.
|
||||
|
||||
Other/Unsupported MPM
|
||||
---------------------
|
||||
|
||||
To use the cookbook with an unsupported mpm (other than prefork, event or worker):
|
||||
|
||||
* set `node['apache']['mpm']` to the name of the module (e.g. `itk`)
|
||||
* in your cookbook, after `include_recipe 'apache2'` use the `apache_module` definition to enable/disable the required module(s)
|
||||
|
||||
Module specific attributes
|
||||
--------------------------
|
||||
|
||||
Some module recipes have their own attributes that can be used to alter and modify the behavior of this cookbook. Please see the sections for the indivual modules below for more information on those attributes.
|
||||
|
||||
|
||||
|
||||
Recipes
|
||||
=======
|
||||
|
||||
Most of the recipes in the cookbook are for enabling Apache modules.
|
||||
Where additional configuration or behavior is used, it is documented
|
||||
below in more detail.
|
||||
|
||||
The following recipes merely enable the specified module: `mod_actions`, `mod_alias`,
|
||||
`mod_auth_basic`, `mod_auth_digest`, `mod_authn_file`, `mod_authnz_ldap`,
|
||||
`mod_authz_default`, `mod_authz_groupfile`, `mod_authz_host`,
|
||||
`mod_authz_user`, `mod_autoindex`, `mod_cgi`, `mod_dav_fs`,
|
||||
`mod_dav_svn`, `mod_deflate`, `mod_dir`, `mod_env`, `mod_expires`,
|
||||
`mod_headers`, `mod_ldap`, `mod_log_config`, `mod_mime`,
|
||||
`mod_negotiation`, `mod_proxy`, `mod_proxy_ajp`, `mod_proxy_balancer`,
|
||||
`mod_proxy_connect`, `mod_proxy_http`, `mod_python`, `mod_rewrite`,
|
||||
`mod_setenvif`, `mod_status`, `mod_wsgi`, `mod_xsendfile`.
|
||||
|
||||
On RHEL Family distributions, certain modules ship with a config file
|
||||
with the package. The recipes here may delete those configuration
|
||||
files to ensure they don't conflict with the settings from the
|
||||
cookbook, which will use per-module configuration in
|
||||
`/etc/httpd/mods-enabled`.
|
||||
|
||||
default
|
||||
-------
|
||||
|
||||
The default recipe does a number of things to set up Apache HTTPd. It
|
||||
also includes a number of modules based on the attribute
|
||||
`node['apache']['default_modules']` as recipes.
|
||||
|
||||
mod\_auth\_cas
|
||||
--------------
|
||||
|
||||
This recipe installs the proper package and enables the `auth_cas`
|
||||
module. It can install from source or package. Package is the default,
|
||||
set the attribute `node['apache']['mod_auth_cas']['from_source']` to
|
||||
true to enable source installation. Modify the version to install by
|
||||
changing the attribute
|
||||
`node['apache']['mod_auth_cas']['source_revision']`. It is a version
|
||||
tag by default, but could be master, or another tag, or branch.
|
||||
|
||||
The module configuration is written out with the `CASCookiePath` set,
|
||||
otherwise an error loading the module may cause Apache to not start.
|
||||
|
||||
**Note**: This recipe does not work on EL 6 platforms unless
|
||||
epel-testing repository is enabled (outside the scope of this
|
||||
cookbook), or the package version 1.0.8.1-3.el6 or higher is otherwise
|
||||
available to the system due to this bug:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=708550
|
||||
|
||||
mod\_auth\_openid
|
||||
-----------------
|
||||
|
||||
This recipe compiles the module from source. In addition to
|
||||
`build-essential`, some other packages are included for installation
|
||||
like the GNU C++ compiler and development headers.
|
||||
|
||||
To use the module in your own cookbooks to authenticate systems using
|
||||
OpenIDs, specify an array of OpenIDs that are allowed to authenticate
|
||||
with the attribute `node['apache']['allowed_openids']`. Use the
|
||||
following in a vhost to protect with OpenID authentication:
|
||||
|
||||
AuthType OpenID require user <%= node['apache']['allowed_openids'].join(' ') %>
|
||||
AuthOpenIDDBLocation <%= node['apache']['mod_auth_openid']['dblocation'] %>
|
||||
|
||||
Change the DBLocation with the attribute as required; this file is in
|
||||
a different location than previous versions, see below. It should be a
|
||||
sane default for most platforms, though, see
|
||||
`attributes/mod_auth_openid.rb`.
|
||||
|
||||
The following attributes are in the `attributes/mod_auth_openid.rb` file.
|
||||
|
||||
* `node['apache']['mod_auth_openid']['checksum']` - sha256sum of the tarball containing the source.
|
||||
* `node['apache']['mod_auth_openid']['ref']` - Any sha, tag, or branch found from https://github.com/bmuller/mod_auth_openid
|
||||
* `node['apache']['mod_auth_openid']['version']` - directory name version within the tarball
|
||||
* `node['apache']['mod_auth_openid']['cache_dir']` - the cache directory is where the sqlite3 database is stored. It is separate so it can be managed as a directory resource.
|
||||
* `node['apache']['mod_auth_openid']['dblocation']` - filename of the sqlite3 database used for directive `AuthOpenIDDBLocation`, stored in the `cache_dir` by default.
|
||||
* `node['apache']['mod_auth_openid']['configure_flags']` - optional array of configure flags passed to the `./configure` step in the compilation of the module.
|
||||
|
||||
|
||||
mod\_fastcgi
|
||||
------------
|
||||
|
||||
Install the fastcgi package and enable the module.
|
||||
|
||||
Note: In Ubuntu 14.04, the `libapache2-mod-fastcgi` module is not available by default due to the [Multiverse](https://help.ubuntu.com/community/Repositories/Ubuntu) repositories.
|
||||
You need to enable the multiverse repositories either from `/etc/apt/sources.list` or use the [apt](https://supermarket.chef.io/cookbooks/apt) cookbook.
|
||||
|
||||
mod\_fcgid
|
||||
----------
|
||||
|
||||
Installs the fcgi package and enables the module. Requires EPEL on
|
||||
RHEL family.
|
||||
|
||||
mod\_php5
|
||||
--------
|
||||
|
||||
Simply installs the appropriate package on Debian, Ubuntu and
|
||||
ArchLinux.
|
||||
|
||||
On Red Hat family distributions including Fedora, the php.conf that
|
||||
comes with the package is removed. On RHEL platforms less than v6, the
|
||||
`php53` package is used.
|
||||
|
||||
* `node['apache']['mod_php5']['install_method']` - default `package` can be overridden to avoid package installs.
|
||||
|
||||
mod\_ssl
|
||||
--------
|
||||
|
||||
Besides installing and enabling `mod_ssl`, this recipe will append
|
||||
port 443 to the `node['apache']['listen']` attributes for all addresses and
|
||||
update the ports.conf.
|
||||
|
||||
|
||||
* `node['apache']['mod_ssl']['cipher_suite']` - sets the SSLCiphersuite value to the specified string. The default is
|
||||
considered "sane" but you may need to change it for your local security policy, e.g. if you have PCI-DSS requirements. Additional
|
||||
commentary on the
|
||||
[original pull request](https://github.com/sous-chefs/apache2/pull/15#commitcomment-1605406).
|
||||
* `node['apache']['mod_ssl']['honor_cipher_order']` - Option to prefer the server's cipher preference order. Default 'On'.
|
||||
* `node['apache']['mod_ssl']['insecure_renegotiation']` - Option to enable support for insecure renegotiation. Default 'Off'.
|
||||
* `node['apache']['mod_ssl']['strict_sni_vhost_check']` - Whether to allow non-SNI clients to access a name-based virtual host. Default 'Off'.
|
||||
* `node['apache']['mod_ssl']['session_cache']` - Configures the OCSP stapling cache. Default `shmcb:/var/run/apache2/ssl_scache`
|
||||
* `node['apache']['mod_ssl']['session_cache_timeout']` - Number of seconds before an SSL session expires in the Session Cache. Default 300.
|
||||
* `node['apache']['mod_ssl']['compression']` - Enable compression on the SSL level. Default 'Off'.
|
||||
* `node['apache']['mod_ssl']['use_stapling']` - Enable stapling of OCSP responses in the TLS handshake. Default 'Off'.
|
||||
* `node['apache']['mod_ssl']['stapling_responder_timeout']` - Timeout for OCSP stapling queries. Default 5
|
||||
* `node['apache']['mod_ssl']['stapling_return_responder_errors']` - Pass stapling related OCSP errors on to client. Default 'Off'
|
||||
* `node['apache']['mod_ssl']['stapling_cache']` - Configures the OCSP stapling cache. Default `shmcb:/var/run/ocsp(128000)`
|
||||
* `node['apache']['mod_ssl']['pass_phrase_dialog']` - Configures SSLPassPhraseDialog. Default `builtin`
|
||||
* `node['apache']['mod_ssl']['mutex']` - Configures SSLMutex. Default `file:/var/run/apache2/ssl_mutex`
|
||||
* `node['apache']['mod_ssl']['directives']` - Hash for add any custom directive.
|
||||
|
||||
For general information on these attributes see http://httpd.apache.org/docs/current/mod/mod_ssl.html
|
||||
|
||||
For more information on these directives and how to best secure your site see
|
||||
- https://bettercrypto.org/
|
||||
- https://wiki.mozilla.org/Security/Server_Side_TLS
|
||||
- https://www.insecure.ws/linux/apache_ssl.html
|
||||
- https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
|
||||
- https://istlsfastyet.com/
|
||||
- https://www.ssllabs.com/projects/best-practices/
|
||||
|
||||
Definitions
|
||||
===========
|
||||
|
||||
The cookbook provides a few definitions. At some point in the future
|
||||
these definitions will be refactored into custom resources see
|
||||
[issue 414](https://github.com/sous-chefs/apache2/issues/414).
|
||||
|
||||
apache\_conf
|
||||
------------
|
||||
|
||||
Writes conf files to the `conf-available` folder, and passes enabled values to `apache_config`.
|
||||
|
||||
This definition should generally be called over `apache_config`.
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the config placed and enabled or disabled with the `a2enconf` or `a2disconf` scripts.
|
||||
* `enable` - Default true, which uses `a2enconf` to enable the config. If false, the config will be disabled with `a2disconf`.
|
||||
* `conf_path` - path to put the config in if you need to override the default `conf-available`.
|
||||
* `source` - The source configuration template name. The default value is `params[:name].conf.erb`
|
||||
* `cookbook` - The cookbook in which the configuration template is located. The default value is the current cookbook.
|
||||
|
||||
### Examples:
|
||||
|
||||
Place and enable the example conf:
|
||||
|
||||
```ruby
|
||||
apache_conf 'example' do
|
||||
enable true
|
||||
end
|
||||
```
|
||||
|
||||
Place and disable (or never enable to begin with) the example conf:
|
||||
|
||||
```ruby
|
||||
apache_conf 'example' do
|
||||
enable false
|
||||
end
|
||||
```
|
||||
|
||||
Place the example conf, which has a different path than the default (conf-*):
|
||||
|
||||
```ruby
|
||||
apache_conf 'example' do
|
||||
conf_path '/random/example/path'
|
||||
enable false
|
||||
end
|
||||
```
|
||||
|
||||
|
||||
apache\_config (internal)
|
||||
--------------------------
|
||||
|
||||
Sets up configuration file for Apache from a template. The
|
||||
template should be in the same cookbook where the definition is used. This is used by the `apache_conf` definition and should not be used directly.
|
||||
|
||||
It will use `a2enconf` and `a2disconf` to control the symlinking of configuration files between `conf-available` and `conf-enabled`.
|
||||
|
||||
Enable or disable an Apache config file in
|
||||
`#{node['apache']['dir']}/conf-available` by calling `a2enconf` or
|
||||
`a2disconf` to manage the symbolic link in
|
||||
`#{node['apache']['dir']}/conf-enabled`. These config files should be created in your cookbook, and placed on the system using `apache_conf`
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the config enabled or disabled with the `a2enconf` or `a2disconf` scripts.
|
||||
* `source` - The location of a template file. The default `name.erb`.
|
||||
* `cookbook` - The cookbook in which the configuration template is located (if it is not located in the current cookbook). The default value is the current cookbook.
|
||||
* `enable` - Default true, which uses `a2enconf` to enable the config. If false, the config will be disabled with `a2disconf`.
|
||||
|
||||
### Examples:
|
||||
|
||||
Enable the example config.
|
||||
|
||||
```ruby
|
||||
apache_config 'example' do
|
||||
enable true
|
||||
end
|
||||
```
|
||||
|
||||
Disable a module:
|
||||
|
||||
```ruby
|
||||
apache_config 'disabled_example' do
|
||||
enable false
|
||||
end
|
||||
```
|
||||
|
||||
See the recipes directory for many more examples of `apache_config`.
|
||||
|
||||
|
||||
apache\_module
|
||||
--------------
|
||||
|
||||
Enable or disable an Apache module in
|
||||
`#{node['apache']['dir']}/mods-available` by calling `a2enmod` or
|
||||
`a2dismod` to manage the symbolic link in
|
||||
`#{node['apache']['dir']}/mods-enabled`. If the module has a
|
||||
configuration file, a template should be created in the cookbook where
|
||||
the definition is used. See __Examples__.
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the module enabled or disabled with the `a2enmod` or `a2dismod` scripts.
|
||||
* `identifier` - String to identify the module for the `LoadModule` directive. Not typically needed, defaults to `#{name}_module`
|
||||
* `enable` - Default true, which uses `a2enmod` to enable the module. If false, the module will be disabled with `a2dismod`.
|
||||
* `conf` - Default false. Set to true if the module has a config file, which will use `apache_mod` for the file.
|
||||
* `filename` - specify the full name of the file, e.g.
|
||||
|
||||
### Examples:
|
||||
|
||||
Enable the ssl module, which also has a configuration template in `templates/default/mods/ssl.conf.erb`.
|
||||
|
||||
```ruby
|
||||
apache_module "ssl" do
|
||||
conf true
|
||||
end
|
||||
```
|
||||
|
||||
Enable the php5 module, which has a different filename than the module default:
|
||||
|
||||
```ruby
|
||||
apache_module "php5" do
|
||||
filename "libphp5.so"
|
||||
end
|
||||
```
|
||||
|
||||
Disable a module:
|
||||
|
||||
```ruby
|
||||
apache_module "disabled_module" do
|
||||
enable false
|
||||
end
|
||||
```
|
||||
|
||||
See the recipes directory for many more examples of `apache_module`.
|
||||
|
||||
apache\_mod (internal)
|
||||
----------------------
|
||||
|
||||
Sets up configuration file for an Apache module from a template. The
|
||||
template should be in the same cookbook where the definition is used.
|
||||
This is used by the `apache_module` definition and is not often used
|
||||
directly.
|
||||
|
||||
This will use a template resource to write the module's configuration
|
||||
file in the `mods-available` under the Apache configuration directory
|
||||
(`node['apache']['dir']`). This is a platform-dependent location. See
|
||||
__apache\_module__.
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the template. When used from the `apache_module`,
|
||||
it will use the same name as the module.
|
||||
|
||||
### Examples:
|
||||
|
||||
Create `#{node['apache']['dir']}/mods-available/alias.conf`.
|
||||
|
||||
```ruby
|
||||
apache_mod "alias"
|
||||
```
|
||||
|
||||
apache\_site
|
||||
------------
|
||||
|
||||
Enable or disable a VirtualHost in
|
||||
`#{node['apache']['dir']}/sites-available` by calling a2ensite or
|
||||
a2dissite to manage the symbolic link in
|
||||
`#{node['apache']['dir']}/sites-enabled`.
|
||||
|
||||
The template for the site must be managed as a separate resource. To
|
||||
combine the template with enabling a site, see `web_app`.
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the site.
|
||||
* `enable` - Default true, which uses `a2ensite` to enable the site. If false, the site will be disabled with `a2dissite`.
|
||||
|
||||
web\_app
|
||||
--------
|
||||
|
||||
Manage a template resource for a VirtualHost site, and enable it with
|
||||
`apache_site`. This is commonly done for managing web applications
|
||||
such as Ruby on Rails, PHP or Django, and the default behavior
|
||||
reflects that. However it is flexible.
|
||||
|
||||
This definition includes some recipes to make sure the system is
|
||||
configured to have Apache and some sane default modules:
|
||||
|
||||
* `apache2`
|
||||
* `apache2::mod_rewrite`
|
||||
* `apache2::mod_deflate`
|
||||
* `apache2::mod_headers`
|
||||
|
||||
It will then configure the template (see __Parameters__ and
|
||||
__Examples__ below), and enable or disable the site per the `enable`
|
||||
parameter.
|
||||
|
||||
### Parameters:
|
||||
|
||||
Current parameters used by the definition:
|
||||
|
||||
* `name` - The name of the site. The template will be written to
|
||||
`#{node['apache']['dir']}/sites-available/#{params['name']}.conf`
|
||||
* `cookbook` - Optional. Cookbook where the source template is. If
|
||||
this is not defined, Chef will use the named template in the
|
||||
cookbook where the definition is used.
|
||||
* `template` - Default `web_app.conf.erb`, source template file.
|
||||
* `enable` - Default true. Passed to the `apache_site` definition.
|
||||
|
||||
Additional parameters can be defined when the definition is called in
|
||||
a recipe, see __Examples__.
|
||||
|
||||
### Examples:
|
||||
|
||||
The recommended way to use the `web_app` definition is in a application specific cookbook named "my_app".
|
||||
The following example would look for a template named 'web_app.conf.erb' in your cookbook containing
|
||||
the apache httpd directives defining the `VirtualHost` that would serve up "my_app".
|
||||
|
||||
```ruby
|
||||
web_app "my_app" do
|
||||
template 'web_app.conf.erb'
|
||||
server_name node['my_app']['hostname']
|
||||
end
|
||||
```
|
||||
|
||||
All parameters are passed into the template. You can use whatever you
|
||||
like. The apache2 cookbook comes with a `web_app.conf.erb` template as
|
||||
an example. The following parameters are used in the template:
|
||||
|
||||
* `server_name` - ServerName directive.
|
||||
* `server_aliases` - ServerAlias directive. Must be an array of aliases.
|
||||
* `docroot` - DocumentRoot directive.
|
||||
* `application_name` - Used in RewriteLog directive. Will be set to the `name` parameter.
|
||||
* `directory_index` - Allow overriding the default DirectoryIndex setting, optional
|
||||
* `directory_options` - Override Options on the docroot, for example to add parameters like Includes or Indexes, optional.
|
||||
* `allow_override` - Modify the AllowOverride directive on the docroot to support apps that need .htaccess to modify configuration or require authentication.
|
||||
|
||||
To use the default web_app, for example:
|
||||
|
||||
```ruby
|
||||
web_app "my_site" do
|
||||
server_name node['hostname']
|
||||
server_aliases [node['fqdn'], "my-site.example.com"]
|
||||
docroot "/srv/www/my_site"
|
||||
cookbook 'apache2'
|
||||
end
|
||||
```
|
||||
|
||||
The parameters specified will be used as:
|
||||
|
||||
* `@params[:server_name]`
|
||||
* `@params[:server_aliases]`
|
||||
* `@params[:docroot]`
|
||||
|
||||
In the template. When you write your own, the `@` is significant.
|
||||
|
||||
For more information about Definitions and parameters, see the
|
||||
[Chef Wiki](http://docs.chef.io/definitions.html)
|
||||
|
||||
Tests
|
||||
=====
|
||||
|
||||
This cookbook in the [source repository](https://github.com/sous-chefs/apache2/)
|
||||
contains chefspec, serverspec tests.
|
||||
|
||||
Please see the CONTRIBUTING file for information on how to add tests
|
||||
for your contributions.
|
||||
|
||||
|
||||
License and Authors
|
||||
===================
|
||||
|
||||
* Author:: Adam Jacob <adam@chef.io>
|
||||
* Author:: Joshua Timberman <joshua@chef.io>
|
||||
* Author:: Bryan McLellan <bryanm@widemile.com>
|
||||
* Author:: Dave Esposito <esposito@espolinux.corpnet.local>
|
||||
* Author:: David Abdemoulaie <github@hobodave.com>
|
||||
* Author:: Edmund Haselwanter <edmund@haselwanter.com>
|
||||
* Author:: Eric Rochester <err8n@virginia.edu>
|
||||
* Author:: Jim Browne <jbrowne@42lines.net>
|
||||
* Author:: Matthew Kent <mkent@magoazul.com>
|
||||
* Author:: Nathen Harvey <nharvey@customink.com>
|
||||
* Author:: Ringo De Smet <ringo.de.smet@amplidata.com>
|
||||
* Author:: Sean OMeara <someara@chef.io>
|
||||
* Author:: Seth Chisamore <schisamo@chef.io>
|
||||
* Author:: Gilles Devaux <gilles@peerpong.com>
|
||||
* Author:: Sander van Zoest <sander+cookbooks@vanzoest.com>
|
||||
* Author:: Taylor Price <tayworm@gmail.com>
|
||||
* Author:: Ben Dean <ben.dean@ontariosystems.com>
|
||||
|
||||
* Copyright:: 2009-2012, Chef Software, Inc
|
||||
* Copyright:: 2011, Atriso
|
||||
* Copyright:: 2011, CustomInk, LLC.
|
||||
* Copyright:: 2013-2014, OneHealth Solutions, Inc.
|
||||
* Copyright:: 2014, Viverae, Inc.
|
||||
* Copyright:: 2015-2016, Alexander van Zoest
|
||||
* Copyright:: 2015, Ontario Systems, LLC
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,355 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Attributes:: default
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2014, Viverae, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['apache']['mpm'] =
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
if node['platform_version'].to_f >= 14.04
|
||||
'event'
|
||||
elsif node['platform_version'].to_f >= 12.04
|
||||
'worker'
|
||||
else
|
||||
'prefork'
|
||||
end
|
||||
when 'debian'
|
||||
node['platform_version'].to_f >= 7.0 ? 'worker' : 'prefork'
|
||||
when 'linuxmint'
|
||||
node['platform_version'].to_i >= 17 ? 'event' : 'prefork'
|
||||
else
|
||||
'prefork'
|
||||
end
|
||||
when 'suse'
|
||||
'prefork'
|
||||
when 'rhel'
|
||||
'prefork'
|
||||
when 'amazon'
|
||||
'prefork'
|
||||
else
|
||||
'prefork'
|
||||
end
|
||||
|
||||
default['apache']['version'] =
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
node['platform_version'].to_f >= 13.10 ? '2.4' : '2.2'
|
||||
when 'linuxmint'
|
||||
node['platform_version'].to_i >= 16 ? '2.4' : '2.2'
|
||||
when 'debian', 'raspbian'
|
||||
node['platform_version'].to_f >= 8.0 ? '2.4' : '2.2'
|
||||
else
|
||||
'2.4'
|
||||
end
|
||||
when 'amazon'
|
||||
node['platform_version'].to_f >= 2013.09 ? '2.4' : '2.2'
|
||||
when 'rhel'
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
node['platform_version'].to_f >= 2013.09 ? '2.4' : '2.2'
|
||||
else
|
||||
node['platform_version'].to_f >= 7.0 ? '2.4' : '2.2'
|
||||
end
|
||||
when 'fedora'
|
||||
'2.4'
|
||||
when 'suse'
|
||||
case node['platform']
|
||||
when 'suse'
|
||||
node['platform_version'].to_f >= 12.1 ? '2.4' : '2.2'
|
||||
else
|
||||
'2.4'
|
||||
end
|
||||
when 'freebsd'
|
||||
'2.4'
|
||||
end
|
||||
|
||||
default['apache']['root_group'] = 'root'
|
||||
default['apache']['default_site_name'] = 'default'
|
||||
|
||||
# Where the various parts of apache are
|
||||
case node['platform']
|
||||
when 'redhat', 'centos', 'scientific', 'fedora', 'amazon', 'oracle'
|
||||
if node['platform'] == 'amazon'
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['package'] = 'httpd24'
|
||||
default['apache']['devel_package'] = 'httpd24-devel'
|
||||
else
|
||||
default['apache']['package'] = 'httpd22'
|
||||
default['apache']['devel_package'] = 'httpd22-devel'
|
||||
end
|
||||
else
|
||||
default['apache']['package'] = 'httpd'
|
||||
default['apache']['devel_package'] = 'httpd-devel'
|
||||
end
|
||||
default['apache']['service_name'] = 'httpd'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
default['apache']['apachectl'] = '/usr/sbin/apachectl'
|
||||
default['apache']['dir'] = '/etc/httpd'
|
||||
default['apache']['log_dir'] = '/var/log/httpd'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'apache'
|
||||
default['apache']['group'] = 'apache'
|
||||
default['apache']['binary'] = '/usr/sbin/httpd'
|
||||
default['apache']['conf_dir'] = '/etc/httpd/conf'
|
||||
default['apache']['docroot_dir'] = '/var/www/html'
|
||||
default['apache']['cgibin_dir'] = '/var/www/cgi-bin'
|
||||
default['apache']['icondir'] =
|
||||
if node['apache']['version'] == '2.4'
|
||||
'/usr/share/httpd/icons'
|
||||
else
|
||||
'/var/www/icons'
|
||||
end
|
||||
default['apache']['cache_dir'] = '/var/cache/httpd'
|
||||
default['apache']['run_dir'] = '/var/run/httpd'
|
||||
default['apache']['lock_dir'] = '/var/run/httpd'
|
||||
default['apache']['pid_file'] =
|
||||
if node['platform_version'].to_f >= 6
|
||||
'/var/run/httpd/httpd.pid'
|
||||
else
|
||||
'/var/run/httpd.pid'
|
||||
end
|
||||
default['apache']['lib_dir'] = node['kernel']['machine'] =~ /^i[36]86$/ ? '/usr/lib/httpd' : '/usr/lib64/httpd'
|
||||
default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
when 'suse', 'opensuse', 'opensuseleap'
|
||||
default['apache']['package'] = 'apache2'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
default['apache']['devel_package'] = 'httpd-devel'
|
||||
default['apache']['apachectl'] = '/usr/sbin/apache2ctl'
|
||||
default['apache']['dir'] = '/etc/apache2'
|
||||
default['apache']['log_dir'] = '/var/log/apache2'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'wwwrun'
|
||||
default['apache']['group'] = 'www'
|
||||
default['apache']['binary'] = '/usr/sbin/httpd2'
|
||||
default['apache']['conf_dir'] = '/etc/apache2'
|
||||
default['apache']['docroot_dir'] = '/srv/www/htdocs'
|
||||
default['apache']['cgibin_dir'] = '/srv/www/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/share/apache2/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache2'
|
||||
default['apache']['run_dir'] = '/var/run/httpd'
|
||||
default['apache']['lock_dir'] = '/var/run/httpd'
|
||||
default['apache']['pid_file'] =
|
||||
if node['platform_version'].to_f > 11.4
|
||||
'/var/run/httpd.pid'
|
||||
else
|
||||
'/var/run/httpd2.pid'
|
||||
end
|
||||
default['apache']['lib_dir'] = node['kernel']['machine'] =~ /^i[36]86$/ ? '/usr/lib/apache2' : '/usr/lib64/apache2'
|
||||
default['apache']['libexec_dir'] = node['apache']['lib_dir']
|
||||
when 'debian', 'ubuntu'
|
||||
default['apache']['package'] = 'apache2'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
default['apache']['devel_package'] =
|
||||
if node['apache']['mpm'] == 'prefork'
|
||||
'apache2-prefork-dev'
|
||||
else
|
||||
'apache2-dev'
|
||||
end
|
||||
default['apache']['apachectl'] = '/usr/sbin/apache2ctl'
|
||||
default['apache']['dir'] = '/etc/apache2'
|
||||
default['apache']['log_dir'] = '/var/log/apache2'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'www-data'
|
||||
default['apache']['group'] = 'www-data'
|
||||
default['apache']['binary'] = '/usr/sbin/apache2'
|
||||
default['apache']['conf_dir'] = '/etc/apache2'
|
||||
default['apache']['cgibin_dir'] = '/usr/lib/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/share/apache2/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache2'
|
||||
default['apache']['run_dir'] = '/var/run/apache2'
|
||||
default['apache']['lock_dir'] = '/var/lock/apache2'
|
||||
# this should use COOK-3917 to educate the initscript of the pid location
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['pid_file'] = '/var/run/apache2/apache2.pid'
|
||||
default['apache']['docroot_dir'] = '/var/www/html'
|
||||
else
|
||||
default['apache']['pid_file'] = '/var/run/apache2.pid'
|
||||
default['apache']['docroot_dir'] = '/var/www'
|
||||
end
|
||||
default['apache']['lib_dir'] = '/usr/lib/apache2'
|
||||
default['apache']['build_dir'] = '/usr/share/apache2'
|
||||
default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
default['apache']['default_site_name'] = '000-default'
|
||||
when 'arch'
|
||||
default['apache']['package'] = 'apache'
|
||||
default['apache']['service_name'] = 'httpd'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
# default['apache']['apachectl'] = '/usr/sbin/apachectl'
|
||||
default['apache']['dir'] = '/etc/httpd'
|
||||
default['apache']['log_dir'] = '/var/log/httpd'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'http'
|
||||
default['apache']['group'] = 'http'
|
||||
default['apache']['binary'] = '/usr/sbin/httpd'
|
||||
default['apache']['conf_dir'] = '/etc/httpd'
|
||||
default['apache']['docroot_dir'] = '/srv/http'
|
||||
default['apache']['cgibin_dir'] = '/usr/share/httpd/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/share/httpd/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/httpd'
|
||||
default['apache']['run_dir'] = '/var/run/httpd'
|
||||
default['apache']['lock_dir'] = '/var/run/httpd'
|
||||
default['apache']['pid_file'] = '/var/run/httpd/httpd.pid'
|
||||
default['apache']['lib_dir'] = '/usr/lib/httpd'
|
||||
default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
when 'freebsd'
|
||||
default['apache']['package'] = 'apache24'
|
||||
default['apache']['dir'] = '/usr/local/etc/apache24'
|
||||
default['apache']['conf_dir'] = '/usr/local/etc/apache24'
|
||||
default['apache']['docroot_dir'] = '/usr/local/www/apache24/data'
|
||||
default['apache']['cgibin_dir'] = '/usr/local/www/apache24/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/local/www/apache24/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache24'
|
||||
default['apache']['run_dir'] = '/var/run'
|
||||
default['apache']['lock_dir'] = '/var/run'
|
||||
default['apache']['lib_dir'] = '/usr/local/libexec/apache24'
|
||||
default['apache']['devel_package'] = 'httpd-devel'
|
||||
default['apache']['perl_pkg'] = 'perl5'
|
||||
default['apache']['apachectl'] = '/usr/local/sbin/apachectl'
|
||||
default['apache']['pid_file'] = '/var/run/httpd.pid'
|
||||
default['apache']['log_dir'] = '/var/log'
|
||||
default['apache']['error_log'] = 'httpd-error.log'
|
||||
default['apache']['access_log'] = 'httpd-access.log'
|
||||
default['apache']['root_group'] = 'wheel'
|
||||
default['apache']['user'] = 'www'
|
||||
default['apache']['group'] = 'www'
|
||||
default['apache']['binary'] = '/usr/local/sbin/httpd'
|
||||
default['apache']['libexec_dir'] = node['apache']['lib_dir']
|
||||
else
|
||||
default['apache']['package'] = 'apache2'
|
||||
default['apache']['devel_package'] = 'apache2-dev'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
default['apache']['dir'] = '/etc/apache2'
|
||||
default['apache']['log_dir'] = '/var/log/apache2'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'www-data'
|
||||
default['apache']['group'] = 'www-data'
|
||||
default['apache']['binary'] = '/usr/sbin/apache2'
|
||||
default['apache']['conf_dir'] = '/etc/apache2'
|
||||
default['apache']['docroot_dir'] = '/var/www'
|
||||
default['apache']['cgibin_dir'] = '/usr/lib/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/share/apache2/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache2'
|
||||
default['apache']['run_dir'] = 'logs'
|
||||
default['apache']['lock_dir'] = 'logs'
|
||||
default['apache']['pid_file'] = 'logs/httpd.pid'
|
||||
default['apache']['lib_dir'] = '/usr/lib/apache2'
|
||||
default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
end
|
||||
|
||||
###
|
||||
# These settings need the unless, since we want them to be tunable,
|
||||
# and we don't want to override the tunings.
|
||||
###
|
||||
|
||||
# General settings
|
||||
if node['apache']['service_name'].nil?
|
||||
default['apache']['service_name'] = node['apache']['package']
|
||||
end
|
||||
default['apache']['listen'] = ['*:80']
|
||||
default['apache']['contact'] = 'ops@example.com'
|
||||
default['apache']['timeout'] = 300
|
||||
default['apache']['keepalive'] = 'On'
|
||||
default['apache']['keepaliverequests'] = 100
|
||||
default['apache']['keepalivetimeout'] = 5
|
||||
default['apache']['locale'] = 'C'
|
||||
default['apache']['sysconfig_additional_params'] = {}
|
||||
default['apache']['default_site_enabled'] = false
|
||||
default['apache']['default_site_port'] = '80'
|
||||
default['apache']['access_file_name'] = '.htaccess'
|
||||
default['apache']['default_release'] = nil
|
||||
default['apache']['log_level'] = 'warn'
|
||||
|
||||
# Security
|
||||
default['apache']['servertokens'] = 'Prod'
|
||||
default['apache']['serversignature'] = 'On'
|
||||
default['apache']['traceenable'] = 'Off'
|
||||
|
||||
# mod_status Allow list, space seprated list of allowed entries.
|
||||
default['apache']['status_allow_list'] = '127.0.0.1 ::1'
|
||||
|
||||
# mod_status ExtendedStatus, set to 'true' to enable
|
||||
default['apache']['ext_status'] = false
|
||||
|
||||
# mod_info Allow list, space seprated list of allowed entries.
|
||||
default['apache']['info_allow_list'] = '127.0.0.1 ::1'
|
||||
|
||||
# Supported mpm list
|
||||
default['apache']['mpm_support'] = %w(prefork worker event)
|
||||
|
||||
# Prefork Attributes
|
||||
default['apache']['prefork']['startservers'] = 16
|
||||
default['apache']['prefork']['minspareservers'] = 16
|
||||
default['apache']['prefork']['maxspareservers'] = 32
|
||||
default['apache']['prefork']['serverlimit'] = 256
|
||||
default['apache']['prefork']['maxrequestworkers'] = 256
|
||||
default['apache']['prefork']['maxconnectionsperchild'] = 10_000
|
||||
|
||||
# Worker Attributes
|
||||
default['apache']['worker']['startservers'] = 4
|
||||
default['apache']['worker']['serverlimit'] = 16
|
||||
default['apache']['worker']['minsparethreads'] = 64
|
||||
default['apache']['worker']['maxsparethreads'] = 192
|
||||
default['apache']['worker']['threadlimit'] = 192
|
||||
default['apache']['worker']['threadsperchild'] = 64
|
||||
default['apache']['worker']['maxrequestworkers'] = 1024
|
||||
default['apache']['worker']['maxconnectionsperchild'] = 0
|
||||
|
||||
# Event Attributes
|
||||
default['apache']['event']['startservers'] = 4
|
||||
default['apache']['event']['serverlimit'] = 16
|
||||
default['apache']['event']['minsparethreads'] = 64
|
||||
default['apache']['event']['maxsparethreads'] = 192
|
||||
default['apache']['event']['threadlimit'] = 192
|
||||
default['apache']['event']['threadsperchild'] = 64
|
||||
default['apache']['event']['maxrequestworkers'] = 1024
|
||||
default['apache']['event']['maxconnectionsperchild'] = 0
|
||||
|
||||
# mod_proxy settings
|
||||
default['apache']['proxy']['require'] = 'all denied'
|
||||
default['apache']['proxy']['order'] = 'deny,allow'
|
||||
default['apache']['proxy']['deny_from'] = 'all'
|
||||
default['apache']['proxy']['allow_from'] = 'none'
|
||||
|
||||
# Default modules to enable via include_recipe
|
||||
default['apache']['default_modules'] = %w(
|
||||
status alias auth_basic authn_core authn_file authz_core authz_groupfile
|
||||
authz_host authz_user autoindex deflate dir env mime negotiation setenvif
|
||||
)
|
||||
|
||||
%w(log_config logio).each do |log_mod|
|
||||
default['apache']['default_modules'] << log_mod if %w(rhel amazon fedora suse arch freebsd).include?(node['platform_family'])
|
||||
end
|
||||
|
||||
if node['apache']['version'] == '2.4'
|
||||
%w(unixd).each do |unix_mod|
|
||||
default['apache']['default_modules'] << unix_mod if %w(rhel amazon fedora suse arch freebsd).include?(node['platform_family'])
|
||||
end
|
||||
|
||||
unless node['platform'] == 'amazon'
|
||||
default['apache']['default_modules'] << 'systemd' if %w(rhel fedora amazon).include?(node['platform_family'])
|
||||
end
|
||||
end
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Attributes:: mod_auth_cas
|
||||
#
|
||||
# Copyright:: 2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['apache']['mod_auth_cas']['from_source'] = false
|
||||
default['apache']['mod_auth_cas']['source_revision'] = 'v1.0.9.1'
|
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Attributes:: mod_auth_openid
|
||||
#
|
||||
# Copyright:: 2013, Chef Software, Inc.
|
||||
# Copyright:: 2014-2016, Alexander van Zoest
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# mod_auth_openids
|
||||
default['apache']['allowed_openids'] = []
|
||||
default['apache']['mod_auth_openid']['ref'] = 'v0.8'
|
||||
default['apache']['mod_auth_openid']['version'] = '0.8'
|
||||
default['apache']['mod_auth_openid']['source_url'] = "https://github.com/bmuller/mod_auth_openid/archive/#{node['apache']['mod_auth_openid']['ref']}.tar.gz"
|
||||
default['apache']['mod_auth_openid']['cache_dir'] = '/var/cache/mod_auth_openid'
|
||||
default['apache']['mod_auth_openid']['dblocation'] = "#{node['apache']['mod_auth_openid']['cache_dir']}/mod_auth_openid.db"
|
||||
|
||||
default['apache']['mod_auth_openid']['configure_flags'] =
|
||||
case node['platform_family']
|
||||
when 'freebsd'
|
||||
[
|
||||
'CPPFLAGS=-I/usr/local/include',
|
||||
'LDFLAGS=-I/usr/local/lib -lsqlite3',
|
||||
]
|
||||
else
|
||||
[]
|
||||
end
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Attributes:: mod_fastcgi
|
||||
#
|
||||
# Copyright:: 2013, Chef Software, Inc.
|
||||
# Copyright:: 2016, Alexander van Zoest
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['apache']['mod_fastcgi']['download_url'] = 'http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz'
|
||||
default['apache']['mod_fastcgi']['install_method'] = 'package'
|
||||
default['apache']['mod_fastcgi']['package'] =
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
'libapache2-mod-fastcgi'
|
||||
when 'amazon'
|
||||
'mod_fastcgi'
|
||||
when 'rhel'
|
||||
'mod_fastcgi'
|
||||
when 'freebsd'
|
||||
if node['apache']['version'] == '2.4'
|
||||
'ap24-mod_fastcgi'
|
||||
else
|
||||
'ap22-mod_fastcgi'
|
||||
end
|
||||
else
|
||||
'mod_fastcgi'
|
||||
end
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Attributes:: mod_pagespeed
|
||||
#
|
||||
# Copyright:: 2013, ZOZI
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['apache2']['mod_pagespeed']['package_link'] =
|
||||
if node['kernel']['machine'] =~ /^i[36']86$/
|
||||
'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb'
|
||||
else
|
||||
'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb'
|
||||
end
|
|
@ -0,0 +1,34 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Attributes:: mod_php5
|
||||
#
|
||||
# Copyright:: 2014, Viverae, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
default['apache']['mod_php']['install_method'] = 'package'
|
||||
default['apache']['mod_php']['module_name'] = 'php5'
|
||||
default['apache']['mod_php']['so_filename'] = 'libphp5.so'
|
||||
default['apache']['mod_php']['so_filename'] = 'mod_php5.so' if node['platform_family'] == 'suse'
|
||||
|
||||
if node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 16.04
|
||||
default['apache']['mod_php']['module_name'] = 'php7'
|
||||
default['apache']['mod_php']['so_filename'] = 'libphp7.0.so'
|
||||
end
|
||||
if node['platform'] == 'debian' && node['platform_version'].to_f >= 9
|
||||
default['apache']['mod_php']['module_name'] = 'php7'
|
||||
default['apache']['mod_php']['so_filename'] = 'libphp7.0.so'
|
||||
end
|
||||
if node['platform'] == 'amazon' && node['apache']['version'] == '2.4'
|
||||
default['apache']['mod_php']['so_filename'] = 'libphp.so'
|
||||
end
|
|
@ -0,0 +1,63 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Attributes:: mod_ssl
|
||||
#
|
||||
# Copyright:: 2012-2013, Chef Software, Inc.
|
||||
# Copyright:: 2014, Viverae, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['apache']['mod_ssl']['port'] = 443
|
||||
default['apache']['mod_ssl']['protocol'] = 'All -SSLv2 -SSLv3'
|
||||
default['apache']['mod_ssl']['cipher_suite'] = 'EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA'
|
||||
default['apache']['mod_ssl']['honor_cipher_order'] = 'On'
|
||||
default['apache']['mod_ssl']['insecure_renegotiation'] = 'Off'
|
||||
default['apache']['mod_ssl']['strict_sni_vhost_check'] = 'Off'
|
||||
default['apache']['mod_ssl']['session_cache'] = 'shmcb:/var/run/apache2/ssl_scache'
|
||||
default['apache']['mod_ssl']['session_cache_timeout'] = 300
|
||||
default['apache']['mod_ssl']['compression'] = 'Off'
|
||||
default['apache']['mod_ssl']['use_stapling'] = 'Off'
|
||||
default['apache']['mod_ssl']['stapling_responder_timeout'] = 5
|
||||
default['apache']['mod_ssl']['stapling_return_responder_errors'] = 'Off'
|
||||
default['apache']['mod_ssl']['stapling_cache'] = 'shmcb:/var/run/ocsp(128000)'
|
||||
default['apache']['mod_ssl']['pass_phrase_dialog'] = 'builtin'
|
||||
default['apache']['mod_ssl']['mutex'] = 'file:/var/run/apache2/ssl_mutex'
|
||||
default['apache']['mod_ssl']['directives'] = {}
|
||||
default['apache']['mod_ssl']['pkg_name'] = 'mod_ssl'
|
||||
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['mod_ssl']['pass_phrase_dialog'] = 'exec:/usr/share/apache2/ask-for-passphrase'
|
||||
end
|
||||
end
|
||||
when 'freebsd'
|
||||
default['apache']['mod_ssl']['session_cache'] = 'shmcb:/var/run/ssl_scache(512000)'
|
||||
default['apache']['mod_ssl']['mutex'] = 'file:/var/run/ssl_mutex'
|
||||
when 'amazon'
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['mod_ssl']['pkg_name'] = 'mod24_ssl'
|
||||
end
|
||||
when 'rhel', 'fedora', 'suse'
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['mod_ssl']['pkg_name'] = 'mod24_ssl'
|
||||
end
|
||||
end
|
||||
default['apache']['mod_ssl']['session_cache'] = 'shmcb:/var/cache/mod_ssl/scache(512000)'
|
||||
default['apache']['mod_ssl']['mutex'] = 'default'
|
||||
end
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Definition:: apache_conf
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
define :apache_conf, enable: true do
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
conf_name = "#{params[:name]}.conf"
|
||||
params[:conf_path] = params[:conf_path] || "#{node['apache']['dir']}/conf-available"
|
||||
|
||||
file "#{params[:conf_path]}/#{params[:name]}" do
|
||||
action :delete
|
||||
end
|
||||
|
||||
template "#{params[:conf_path]}/#{conf_name}" do
|
||||
source params[:source] || "#{conf_name}.erb"
|
||||
cookbook params[:cookbook] if params[:cookbook]
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
backup false
|
||||
mode '0644'
|
||||
notifies :restart, 'service[apache2]', :delayed
|
||||
end
|
||||
|
||||
if params[:enable]
|
||||
apache_config params[:name] do
|
||||
enable true
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Definition:: apache_config
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
define :apache_config, enable: true do
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
conf_name = "#{params[:name]}.conf"
|
||||
params[:conf_path] = params[:conf_path] || "#{node['apache']['dir']}/conf-available"
|
||||
|
||||
if params[:enable]
|
||||
execute "a2enconf #{conf_name}" do
|
||||
command "/usr/sbin/a2enconf #{conf_name}"
|
||||
notifies :restart, 'service[apache2]', :delayed
|
||||
not_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/conf-enabled/#{conf_name}") &&
|
||||
(::File.exist?(params[:conf_path]) ? ::File.symlink?("#{node['apache']['dir']}/conf-enabled/#{conf_name}") : true)
|
||||
end
|
||||
end
|
||||
else
|
||||
execute "a2disconf #{conf_name}" do
|
||||
command "/usr/sbin/a2disconf #{conf_name}"
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
only_if { ::File.symlink?("#{node['apache']['dir']}/conf-enabled/#{conf_name}") }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Definition:: apache_mod
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
define :apache_mod do
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
template "#{node['apache']['dir']}/mods-available/#{params[:name]}.conf" do
|
||||
source "mods/#{params[:name]}.conf.erb"
|
||||
mode '0644'
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
end
|
|
@ -0,0 +1,58 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Definition:: apache_module
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
define :apache_module, enable: true, conf: false, restart: false do
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
params[:filename] = params[:filename] || "mod_#{params[:name]}.so"
|
||||
params[:module_path] = params[:module_path] || "#{node['apache']['libexec_dir']}/#{params[:filename]}"
|
||||
params[:identifier] = params[:identifier] || "#{params[:name]}_module"
|
||||
|
||||
apache_mod params[:name] if params[:conf]
|
||||
|
||||
file "#{node['apache']['dir']}/mods-available/#{params[:name]}.load" do
|
||||
content "LoadModule #{params[:identifier]} #{params[:module_path]}\n"
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
if params[:enable]
|
||||
execute "a2enmod #{params[:name]}" do
|
||||
command "/usr/sbin/a2enmod #{params[:name]}"
|
||||
if params[:restart]
|
||||
notifies :restart, 'service[apache2]', :delayed
|
||||
else
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
not_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") &&
|
||||
(::File.exist?("#{node['apache']['dir']}/mods-available/#{params[:name]}.conf") ? ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.conf") : true)
|
||||
end
|
||||
end
|
||||
else
|
||||
execute "a2dismod #{params[:name]}" do
|
||||
command "/usr/sbin/a2dismod #{params[:name]}"
|
||||
if params[:restart]
|
||||
notifies :restart, 'service[apache2]', :delayed
|
||||
else
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
only_if { ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Definition:: apache_site
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
define :apache_site, enable: true do
|
||||
include_recipe 'apache2::default'
|
||||
conf_name = "#{params[:name]}.conf"
|
||||
|
||||
if params[:enable]
|
||||
execute "a2ensite #{conf_name}" do
|
||||
command "/usr/sbin/a2ensite #{conf_name}"
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
not_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/#{conf_name}") ||
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/000-#{conf_name}")
|
||||
end
|
||||
only_if { ::File.exist?("#{node['apache']['dir']}/sites-available/#{conf_name}") }
|
||||
end
|
||||
else
|
||||
execute "a2dissite #{conf_name}" do
|
||||
command "/usr/sbin/a2dissite #{conf_name}"
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
only_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/#{conf_name}") ||
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/000-#{conf_name}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,48 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Definition:: web_app
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
define :web_app, template: 'web_app.conf.erb', local: false, enable: true, server_port: 80 do
|
||||
application_name = params[:name]
|
||||
|
||||
include_recipe 'apache2::default'
|
||||
include_recipe 'apache2::mod_rewrite'
|
||||
include_recipe 'apache2::mod_deflate'
|
||||
include_recipe 'apache2::mod_headers'
|
||||
|
||||
template "#{node['apache']['dir']}/sites-available/#{application_name}.conf" do
|
||||
source params[:template]
|
||||
local params[:local]
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
cookbook params[:cookbook] if params[:cookbook]
|
||||
variables(
|
||||
application_name: application_name,
|
||||
params: params
|
||||
)
|
||||
if ::File.exist?("#{node['apache']['dir']}/sites-enabled/#{application_name}.conf")
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
end
|
||||
|
||||
site_enabled = params[:enable]
|
||||
apache_site params[:name] do
|
||||
enable site_enabled
|
||||
end
|
||||
end
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
=begin
|
||||
|
||||
Generates Ubuntu style module.load files.
|
||||
|
||||
./apache2_module_conf_generate.pl /usr/lib64/httpd/modules /etc/httpd/mods-available
|
||||
|
||||
ARGV[0] is the apache modules directory, ARGV[1] is where you want 'em.
|
||||
|
||||
=cut
|
||||
|
||||
use File::Find;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
die "Must have '/path/to/modules' and '/path/to/modules.load'"
|
||||
unless $ARGV[0] && $ARGV[1];
|
||||
|
||||
find(
|
||||
{
|
||||
wanted => sub {
|
||||
return 1 if $File::Find::name !~ /\.so$/;
|
||||
my $modfile = $_;
|
||||
$modfile =~ /(lib|mod_)(.+)\.so$/;
|
||||
my $modname = $2;
|
||||
my $filename = "$ARGV[1]/$modname.load";
|
||||
unless ( -f $filename ) {
|
||||
open( FILE, ">", $filename ) or die "Cannot open $filename";
|
||||
print FILE "LoadModule " . $modname . "_module $File::Find::name\n";
|
||||
close(FILE);
|
||||
}
|
||||
},
|
||||
follow => 1,
|
||||
},
|
||||
$ARGV[0]
|
||||
);
|
||||
|
||||
exit 0;
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
# encoding: utf-8
|
||||
#
|
||||
# Cookbook:: apache2
|
||||
# Libraries:: listen
|
||||
#
|
||||
# Copyright:: 2015, Ontario Systems, LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
module Apache2
|
||||
# Provides method to convert node['apache']['listen_ports'] and node['apache']['listen_addresses'] into new node['apache']['listen']
|
||||
module Listen
|
||||
# @param node [Chef::Node] the chef node
|
||||
# @return [Hash] a hash indexed by address where the values are arrays of ports to listen to
|
||||
def merge_listen_attributes(node)
|
||||
(Apache2::Listen.converted_listen_ports_and_addresses(node) + node['apache']['listen']).uniq
|
||||
end
|
||||
|
||||
module_function :merge_listen_attributes
|
||||
|
||||
private_class_method
|
||||
|
||||
def self.converted_listen_ports_and_addresses(node)
|
||||
return [] unless node['apache']['listen_ports'] || node['apache']['listen_addresses']
|
||||
Chef::Log.warn "node['apache']['listen_ports'] and node['apache']['listen_addresses'] are deprecated in favor of node['apache']['listen']. Please adjust your cookbooks"
|
||||
|
||||
# Defaults to * for addresses or 80 / 443 for ports if not specified
|
||||
(node['apache']['listen_addresses'] || %w(*)).uniq.each_with_object([]) do |address, listen|
|
||||
(node['apache']['listen_ports'] || %w(80 443)).uniq.each do |port|
|
||||
listen << "#{address}:#{port}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,219 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2014-2015, Alexander van Zoest
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package 'apache2' do # ~FC009 only available in apt_package. See #388
|
||||
package_name node['apache']['package']
|
||||
default_release node['apache']['default_release'] unless node['apache']['default_release'].nil?
|
||||
end
|
||||
|
||||
%w(sites-available sites-enabled mods-available mods-enabled conf-available conf-enabled).each do |dir|
|
||||
directory "#{node['apache']['dir']}/#{dir}" do
|
||||
mode '0755'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
end
|
||||
|
||||
%w(default default.conf 000-default 000-default.conf).each do |site|
|
||||
link "#{node['apache']['dir']}/sites-enabled/#{site}" do
|
||||
action :delete
|
||||
not_if { site == "#{node['apache']['default_site_name']}.conf" && node['apache']['default_site_enabled'] }
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/sites-available/#{site}" do
|
||||
action :delete
|
||||
backup false
|
||||
not_if { site == "#{node['apache']['default_site_name']}.conf" && node['apache']['default_site_enabled'] }
|
||||
end
|
||||
end
|
||||
|
||||
directory node['apache']['log_dir'] do
|
||||
mode '0755'
|
||||
recursive true
|
||||
end
|
||||
|
||||
# perl is needed for the a2* scripts
|
||||
package node['apache']['perl_pkg']
|
||||
|
||||
package 'perl-Getopt-Long-Descriptive' if platform?('fedora')
|
||||
|
||||
%w(a2ensite a2dissite a2enmod a2dismod a2enconf a2disconf).each do |modscript|
|
||||
link "/usr/sbin/#{modscript}" do
|
||||
action :delete
|
||||
only_if { ::File.symlink?("/usr/sbin/#{modscript}") }
|
||||
end
|
||||
|
||||
template "/usr/sbin/#{modscript}" do
|
||||
source "#{modscript}.erb"
|
||||
mode '0700'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
action :create
|
||||
end
|
||||
end
|
||||
|
||||
unless platform_family?('debian')
|
||||
cookbook_file '/usr/local/bin/apache2_module_conf_generate.pl' do
|
||||
source 'apache2_module_conf_generate.pl'
|
||||
mode '0755'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
|
||||
execute 'generate-module-list' do
|
||||
command "/usr/local/bin/apache2_module_conf_generate.pl #{node['apache']['lib_dir']} #{node['apache']['dir']}/mods-available"
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
if platform_family?('freebsd')
|
||||
|
||||
directory "#{node['apache']['dir']}/Includes" do
|
||||
action :delete
|
||||
recursive true
|
||||
end
|
||||
|
||||
directory "#{node['apache']['dir']}/extra" do
|
||||
action :delete
|
||||
recursive true
|
||||
end
|
||||
end
|
||||
|
||||
if platform_family?('suse')
|
||||
|
||||
directory "#{node['apache']['dir']}/vhosts.d" do
|
||||
action :delete
|
||||
recursive true
|
||||
end
|
||||
|
||||
%w(charset.conv default-vhost.conf default-server.conf default-vhost-ssl.conf errors.conf listen.conf mime.types mod_autoindex-defaults.conf mod_info.conf mod_log_config.conf mod_status.conf mod_userdir.conf mod_usertrack.conf uid.conf).each do |file|
|
||||
file "#{node['apache']['dir']}/#{file}" do
|
||||
action :delete
|
||||
backup false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
%W(
|
||||
#{node['apache']['dir']}/ssl
|
||||
#{node['apache']['cache_dir']}
|
||||
).each do |path|
|
||||
directory path do
|
||||
mode '0755'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
end
|
||||
|
||||
directory node['apache']['lock_dir'] do
|
||||
mode '0755'
|
||||
if node['platform_family'] == 'debian'
|
||||
owner node['apache']['user']
|
||||
else
|
||||
owner 'root'
|
||||
end
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
|
||||
# Set the preferred execution binary - prefork or worker
|
||||
template "/etc/sysconfig/#{node['apache']['package']}" do
|
||||
source 'etc-sysconfig-httpd.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
notifies :restart, 'service[apache2]', :delayed
|
||||
only_if { platform_family?('rhel', 'amazon', 'fedora', 'suse') }
|
||||
end
|
||||
|
||||
template "#{node['apache']['dir']}/envvars" do
|
||||
source 'envvars.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
only_if { platform_family?('debian') }
|
||||
end
|
||||
|
||||
template 'apache2.conf' do
|
||||
if platform_family?('rhel', 'amazon', 'fedora', 'arch', 'freebsd')
|
||||
path "#{node['apache']['conf_dir']}/httpd.conf"
|
||||
elsif platform_family?('debian')
|
||||
path "#{node['apache']['conf_dir']}/apache2.conf"
|
||||
elsif platform_family?('suse')
|
||||
path "#{node['apache']['conf_dir']}/httpd.conf"
|
||||
end
|
||||
action :create
|
||||
source 'apache2.conf.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
|
||||
%w(security charset).each do |conf|
|
||||
apache_conf conf do
|
||||
enable true
|
||||
end
|
||||
end
|
||||
|
||||
apache_conf 'ports' do
|
||||
enable false
|
||||
conf_path node['apache']['dir']
|
||||
end
|
||||
|
||||
if node['apache']['version'] == '2.4'
|
||||
if node['apache']['mpm_support'].include?(node['apache']['mpm'])
|
||||
include_recipe "apache2::mpm_#{node['apache']['mpm']}"
|
||||
else
|
||||
Chef::Log.warn("apache2: #{node['apache']['mpm']} module is not supported and must be handled separately!")
|
||||
end
|
||||
end
|
||||
|
||||
node['apache']['default_modules'].each do |mod|
|
||||
module_recipe_name = mod =~ /^mod_/ ? mod : "mod_#{mod}"
|
||||
include_recipe "apache2::#{module_recipe_name}"
|
||||
end
|
||||
|
||||
if node['apache']['default_site_enabled']
|
||||
web_app node['apache']['default_site_name'] do
|
||||
template 'default-site.conf.erb'
|
||||
enable node['apache']['default_site_enabled']
|
||||
end
|
||||
end
|
||||
|
||||
apache_service_name = node['apache']['service_name']
|
||||
|
||||
service 'apache2' do
|
||||
service_name apache_service_name
|
||||
case node['platform_family']
|
||||
when 'rhel'
|
||||
if node['platform_version'].to_f < 7.0 && node['apache']['version'] != '2.4'
|
||||
restart_command "/sbin/service #{apache_service_name} restart && sleep 1"
|
||||
reload_command "/sbin/service #{apache_service_name} graceful && sleep 1"
|
||||
end
|
||||
when 'debian'
|
||||
provider Chef::Provider::Service::Debian
|
||||
when 'arch'
|
||||
service_name apache_service_name
|
||||
end
|
||||
supports [:start, :restart, :reload, :status]
|
||||
action [:enable, :start]
|
||||
only_if "#{node['apache']['binary']} -t", environment: { 'APACHE_LOG_DIR' => node['apache']['log_dir'] }, timeout: 10
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_access_compat
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'access_compat'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_actions
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'actions' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_alias
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'alias' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_allowmethods
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'allowmethods'
|
|
@ -0,0 +1,50 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: apreq2
|
||||
#
|
||||
# modified from the python recipe by Jeremy Bingham
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
package 'libapache2-mod-apreq2'
|
||||
when 'suse'
|
||||
package 'apache2-mod_apreq2' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
when 'rhel', 'fedora', 'amazon'
|
||||
package 'libapreq2' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
# seems that the apreq lib is weirdly broken or something - it needs to be
|
||||
# loaded as 'apreq', but on RHEL & derivitatives the file needs a symbolic
|
||||
# link to mod_apreq.so.
|
||||
link "#{node['apache']['libexec_dir']}/mod_apreq.so" do
|
||||
to "#{node['apache']['libexec_dir']}/mod_apreq2.so"
|
||||
only_if "test -f #{node['apache']['libexec_dir']}/mod_apreq2.so"
|
||||
end
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/apreq.conf" do
|
||||
content '# conf is under mods-available/apreq.conf - apache2 cookbook\n'
|
||||
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
|
||||
end
|
||||
|
||||
apache_module 'apreq'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_asis
|
||||
#
|
||||
# Copyright:: 2008-2009, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'asis'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_auth_basic
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'auth_basic'
|
|
@ -0,0 +1,68 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_auth_cas
|
||||
#
|
||||
# Copyright:: 2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
if node['apache']['mod_auth_cas']['from_source']
|
||||
package node['apache']['devel_package']
|
||||
|
||||
git '/tmp/mod_auth_cas' do
|
||||
repository 'git://github.com/Jasig/mod_auth_cas.git'
|
||||
revision node['apache']['mod_auth_cas']['source_revision']
|
||||
notifies :run, 'execute[compile mod_auth_cas]', :immediately
|
||||
end
|
||||
|
||||
execute 'compile mod_auth_cas' do
|
||||
command './configure && make && make install'
|
||||
cwd '/tmp/mod_auth_cas'
|
||||
not_if "test -f #{node['apache']['libexec_dir']}/mod_auth_cas.so"
|
||||
end
|
||||
|
||||
template "#{node['apache']['dir']}/mods-available/auth_cas.load" do
|
||||
source 'mods/auth_cas.load.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
else
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
package 'libapache2-mod-auth-cas'
|
||||
|
||||
when 'rhel', 'fedora', 'amazon'
|
||||
yum_package 'mod_auth_cas' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/auth_cas.conf" do
|
||||
content '# conf is under mods-available/auth_cas.conf - apache2 cookbook\n'
|
||||
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
apache_module 'auth_cas' do
|
||||
conf true
|
||||
end
|
||||
|
||||
directory "#{node['apache']['cache_dir']}/mod_auth_cas" do
|
||||
owner node['apache']['user']
|
||||
group node['apache']['group']
|
||||
mode '0700'
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_auth_digest
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'auth_digest'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_auth_form
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'auth_form'
|
|
@ -0,0 +1,122 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_auth_openid
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
openid_dev_pkgs = value_for_platform_family(
|
||||
'debian' => %W(automake make g++ #{node['apache']['devel_package']} libopkele-dev libopkele3 libtool),
|
||||
'suse' => %W(automake make g++ #{node['apache']['devel_package']} libopkele-dev libopkele3 libtool),
|
||||
%w(rhel fedora amazon) => %W(gcc-c++ #{node['apache']['devel_package']} curl-devel libtidy libtidy-devel sqlite-devel pcre-devel openssl-devel make libtool),
|
||||
'arch' => %w(libopkele),
|
||||
'freebsd' => %w(libopkele pcre sqlite3)
|
||||
)
|
||||
|
||||
make_cmd = value_for_platform_family(
|
||||
'freebsd' => { 'default' => 'gmake' },
|
||||
'default' => 'make'
|
||||
)
|
||||
|
||||
case node['platform_family']
|
||||
when 'arch'
|
||||
package 'tidyhtml'
|
||||
|
||||
pacman_aur openid_dev_pkgs.first do
|
||||
action [:build, :install]
|
||||
end
|
||||
else
|
||||
openid_dev_pkgs.each do |pkg|
|
||||
package pkg
|
||||
end
|
||||
end
|
||||
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora', 'amazon'
|
||||
remote_file "#{Chef::Config['file_cache_path']}/libopkele-2.0.4.tar.gz" do
|
||||
source 'http://kin.klever.net/dist/libopkele-2.0.4.tar.gz'
|
||||
mode '0644'
|
||||
checksum '57a5bc753b7e80c5ece1e5968b2051b0ce7ed9ce4329d17122c61575a9ea7648'
|
||||
end
|
||||
|
||||
bash 'install libopkele' do
|
||||
cwd Chef::Config['file_cache_path']
|
||||
# Ruby 1.8.6 does not have rpartition, unfortunately
|
||||
syslibdir = node['apache']['lib_dir'][0..node['apache']['lib_dir'].rindex('/')]
|
||||
code <<-EOH
|
||||
tar zxvf libopkele-2.0.4.tar.gz
|
||||
cd libopkele-2.0.4 && ./configure --prefix=/usr --libdir=#{syslibdir}
|
||||
#{make_cmd} && #{make_cmd} install
|
||||
EOH
|
||||
creates "#{syslibdir}/libopkele.a"
|
||||
end
|
||||
end
|
||||
|
||||
version = node['apache']['mod_auth_openid']['version']
|
||||
configure_flags = node['apache']['mod_auth_openid']['configure_flags']
|
||||
|
||||
remote_file "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}.tar.gz" do
|
||||
source node['apache']['mod_auth_openid']['source_url']
|
||||
mode '0644'
|
||||
action :create_if_missing
|
||||
end
|
||||
|
||||
directory node['apache']['mod_auth_openid']['cache_dir'] do
|
||||
owner node['apache']['user']
|
||||
group node['apache']['group']
|
||||
mode '0700'
|
||||
end
|
||||
|
||||
bash 'untar mod_auth_openid' do
|
||||
cwd Chef::Config['file_cache_path']
|
||||
code <<-EOH
|
||||
tar zxvf mod_auth_openid-#{version}.tar.gz
|
||||
EOH
|
||||
creates "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}/src/types.h"
|
||||
end
|
||||
|
||||
bash 'compile mod_auth_openid' do
|
||||
cwd "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}"
|
||||
code <<-EOH
|
||||
./autogen.sh
|
||||
./configure #{configure_flags.join(' ')}
|
||||
perl -pi -e "s/-i -a -n 'authopenid'/-i -n 'authopenid'/g" Makefile
|
||||
#{make_cmd}
|
||||
EOH
|
||||
creates "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}/src/.libs/mod_auth_openid.so"
|
||||
notifies :run, 'bash[install-mod_auth_openid]', :immediately
|
||||
not_if "test -f #{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}/src/.libs/mod_auth_openid.so"
|
||||
end
|
||||
|
||||
bash 'install-mod_auth_openid' do
|
||||
cwd "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}"
|
||||
code <<-EOH
|
||||
#{make_cmd} install
|
||||
EOH
|
||||
creates "#{node['apache']['libexec_dir']}/mod_auth_openid.so"
|
||||
notifies :restart, 'service[apache2]'
|
||||
not_if "test -f #{node['apache']['libexec_dir']}/mod_auth_openid.so"
|
||||
end
|
||||
|
||||
template "#{node['apache']['dir']}/mods-available/authopenid.load" do
|
||||
source 'mods/authopenid.load.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
apache_module 'authopenid' do
|
||||
filename 'mod_auth_openid.so'
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authn_anon
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authn_anon'
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authn_core
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
if node['apache']['version'] == '2.4'
|
||||
apache_module 'authn_core'
|
||||
else
|
||||
Chef::Log.info('Ignoring apache2::mod_authn_core. not available until apache 2.4')
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authn_dbd
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authn_dbd'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authn_dbm
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authn_dbm'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authn_file
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authn_file'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authn_socache
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authn_socache'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authnz_fcgi
|
||||
#
|
||||
# Copyright:: 2016, Alexander van Zoest
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authnz_fcgi'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authnz_ldap
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe 'apache2::mod_ldap'
|
||||
|
||||
apache_module 'authnz_ldap'
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authz_core
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if node['apache']['version'] == '2.4'
|
||||
apache_module 'authz_core'
|
||||
else
|
||||
apache_module 'authz_default'
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authz_dbd
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authz_dbd'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authz_dbm
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authz_dbm'
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authz_default
|
||||
#
|
||||
# Copyright:: 2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#
|
||||
log 'apache2::mod_authz_default is deprecated in favor of apache2::mod_authz_core. Please adjust your cookbooks'
|
||||
include_recipe 'apache2::mod_authz_core'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authz_groupfile
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authz_groupfile'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authz_host
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authz_host'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authz_owner
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authz_owner'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_authz_user
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'authz_user'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_autoindex
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'autoindex' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_buffer
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'buffer'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_cache
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'cache'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_cache_disk
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'cache_disk' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_cache_socache
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'cache_socache'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_cern_meta
|
||||
#
|
||||
# Copyright:: 2016, Alexander van Zoest
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'cern_meta'
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_cgi
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2014, Viverae, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if node['apache']['mpm'] == 'prefork'
|
||||
apache_module 'cgi'
|
||||
else
|
||||
Chef::Log.warn "apache::mod_cgi. Your MPM #{node['apache']['mpm']} seems to be threaded. Selecting cgid instead of cgi."
|
||||
apache_module 'cgid'
|
||||
end
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_cgid
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
# Copyright:: 2014, Viverae, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'cgid' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_charset_lite
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'charset_lite'
|
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_cloudflare
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apt_repository 'cloudflare' do
|
||||
uri 'http://pkg.cloudflare.com'
|
||||
distribution node['lsb']['codename']
|
||||
components ['main']
|
||||
key 'http://pkg.cloudflare.com/pubkey.gpg'
|
||||
action :add
|
||||
end
|
||||
|
||||
package 'libapache2-mod-cloudflare' do
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_data
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'data'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_dav
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'dav'
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_dav_fs
|
||||
#
|
||||
# Copyright:: 2011-2013, Atriso
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe 'apache2::mod_dav'
|
||||
apache_module 'dav_fs' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_dav_lock
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe 'apache2::mod_dav'
|
||||
apache_module 'dav_lock'
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_dav_svn
|
||||
#
|
||||
# Copyright:: 2008-2009, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe 'apache2::mod_dav'
|
||||
|
||||
package 'libapache2-svn' do
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora', 'suse', 'amazon'
|
||||
package_name 'mod_dav_svn'
|
||||
else
|
||||
package_name 'libapache2-svn'
|
||||
end
|
||||
end
|
||||
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora', 'suse', 'amazon'
|
||||
file "#{node['apache']['dir']}/conf.d/subversion.conf" do
|
||||
action :delete
|
||||
backup false
|
||||
end
|
||||
end
|
||||
|
||||
apache_module 'dav_svn'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_dbd
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'dbd'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_deflate
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'deflate' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_dialup
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'dialup'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_dir
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'dir' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_dump_io
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'dumpio'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_echo
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'echo'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_env
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'env'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_expires
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'expires'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_ext_filter
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'ext_filter'
|
|
@ -0,0 +1,62 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_fastcgi
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if node['apache']['mod_fastcgi']['install_method'] == 'package'
|
||||
package node['apache']['mod_fastcgi']['package']
|
||||
else
|
||||
if platform_family?('debian')
|
||||
package 'build-essential'
|
||||
package node['apache']['devel_package']
|
||||
elsif platform_family?('rhel', 'amazon')
|
||||
%W(gcc make libtool #{node['apache']['devel_package']} apr-devel apr).each do |package|
|
||||
package package do
|
||||
action :upgrade
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
src_filepath = "#{Chef::Config['file_cache_path']}/fastcgi.tar.gz"
|
||||
remote_file 'download fastcgi source' do
|
||||
source node['apache']['mod_fastcgi']['download_url']
|
||||
path src_filepath
|
||||
backup false
|
||||
end
|
||||
|
||||
top_dir = if platform_family?('debian')
|
||||
node['apache']['build_dir']
|
||||
else
|
||||
node['apache']['lib_dir']
|
||||
end
|
||||
include_recipe 'apache2::default'
|
||||
bash 'compile fastcgi source' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately if platform_family?('rhel', 'amazon')
|
||||
not_if "test -f #{node['apache']['dir']}/mods-available/fastcgi.conf"
|
||||
cwd ::File.dirname(src_filepath)
|
||||
code <<-EOH
|
||||
tar zxf #{::File.basename(src_filepath)} &&
|
||||
cd mod_fastcgi-* &&
|
||||
cp Makefile.AP2 Makefile &&
|
||||
make top_dir=#{top_dir} && make install top_dir=#{top_dir}
|
||||
EOH
|
||||
end
|
||||
end
|
||||
|
||||
apache_module 'fastcgi' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,67 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_fcgid
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?('debian')
|
||||
package 'libapache2-mod-fcgid'
|
||||
elsif platform_family?('rhel', 'fedora', 'amazon')
|
||||
package 'mod_fcgid' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/fcgid.conf" do
|
||||
content '# conf is under mods-available/fcgid.conf - apache2 cookbook\n'
|
||||
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
|
||||
end
|
||||
|
||||
# CentOS 7 (and recent Fedoras) have Apache 2.4, where FCGI socket path
|
||||
# and shared memory path is managed adequately without further involvment
|
||||
# neccessary (subdirectory is created under /var/run/httpd).
|
||||
#
|
||||
# However, when the path is specified manually, that subdirectory is NOT
|
||||
# created automatically if it doesn't already exist and Apache fails to
|
||||
# start. Since in recent RHEL systems /var/run is on tmpfs, end result is
|
||||
# that chef-created subdirectory disappears on shutdown, and Apache fails
|
||||
# to start after server reboot. Best to leave out these two settings
|
||||
# unset then.
|
||||
if (node['platform_family'] == 'rhel') && (node['platform_version'].to_i == 6)
|
||||
directory '/var/run/httpd/mod_fcgid' do
|
||||
owner node['apache']['user']
|
||||
group node['apache']['group']
|
||||
recursive true
|
||||
end
|
||||
end
|
||||
|
||||
elsif platform_family?('suse')
|
||||
apache_lib_path = node['apache']['lib_dir']
|
||||
|
||||
package node['apache']['devel_package']
|
||||
|
||||
bash 'install-fcgid' do
|
||||
code <<-EOH
|
||||
(cd #{Chef::Config['file_cache_path']}; wget http://superb-east.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.2.tgz)
|
||||
(cd #{Chef::Config['file_cache_path']}; tar zxvf mod_fcgid.2.2.tgz)
|
||||
(cd #{Chef::Config['file_cache_path']}; perl -pi -e 's!/usr/local/apache2!#{apache_lib_path}!g' ./mod_fcgid.2.2/Makefile)
|
||||
(cd #{Chef::Config['file_cache_path']}/mod_fcgid.2.2; make install)
|
||||
EOH
|
||||
end
|
||||
end
|
||||
|
||||
apache_module 'fcgid' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_file_cache
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'file_cache'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_filter
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'filter'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_headers
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'headers' do
|
||||
restart true
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_heartbeat
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'heartbeat'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_heartmonitor
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'heartmonitor'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_http2
|
||||
#
|
||||
# Copyright:: 2016, Alexander van Zoest
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'http2'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_ident
|
||||
#
|
||||
# Copyright:: 2016, Alexander van Zoest
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'ident'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_include
|
||||
#
|
||||
# Copyright:: 2012-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'include' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_info
|
||||
#
|
||||
# Copyright:: 2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'info' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: jk
|
||||
#
|
||||
# Copyright:: 2013, Mike Babineau <michael.babineau@gmail.com>
|
||||
# Copyright:: 2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package 'libapache2-mod-jk' do
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora', 'suse', 'amazon'
|
||||
package_name 'mod_jk'
|
||||
else
|
||||
package_name 'libapache2-mod-jk'
|
||||
end
|
||||
end
|
||||
|
||||
apache_module 'jk'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_lbmethod_bybusyness
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'lbmethod_bybusyness'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_lbmethod_byrequests
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'lbmethod_byrequests'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_lbmethod_bytraffic
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'lbmethod_bytraffic'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_lbmethod_heartbeat
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'lbmethod_heartbeat'
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_ldap
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?('rhel', 'amazon') && node['apache']['version'] == '2.4'
|
||||
package 'mod_ldap'
|
||||
end
|
||||
|
||||
apache_module 'ldap' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_log_config
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?('rhel', 'fedora', 'suse', 'arch', 'freebsd', 'amazon')
|
||||
apache_module 'log_config'
|
||||
else
|
||||
include_recipe 'apache2::default'
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_log_debug
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'log_debug'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_log_forensic
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'log_forensic'
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_logio
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?('rhel', 'fedora', 'suse', 'arch', 'freebsd', 'amazon')
|
||||
apache_module 'logio'
|
||||
else
|
||||
include_recipe 'apache2::default'
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_lua
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'lua'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_macro
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'macro'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_mime
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'mime' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_mime_magic
|
||||
#
|
||||
# Copyright:: 2013, OneHealth Solutions, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'mime_magic' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_negotiation
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module 'negotiation' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,37 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_pagespeed
|
||||
#
|
||||
# Copyright:: 2013, ZOZI
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?('debian')
|
||||
remote_file "#{Chef::Config[:file_cache_path]}/mod-pagespeed.deb" do
|
||||
source node['apache2']['mod_pagespeed']['package_link']
|
||||
mode '0644'
|
||||
action :create_if_missing
|
||||
end
|
||||
|
||||
package 'mod_pagespeed' do
|
||||
source "#{Chef::Config[:file_cache_path]}/mod-pagespeed.deb"
|
||||
action :install
|
||||
end
|
||||
|
||||
apache_module 'pagespeed' do
|
||||
conf true
|
||||
end
|
||||
else
|
||||
Chef::Log.warn "apache::mod_pagespeed does not support #{node['platform_family']} yet, and is not being installed"
|
||||
end
|
|
@ -0,0 +1,59 @@
|
|||
#
|
||||
# Cookbook:: apache2
|
||||
# Recipe:: mod_perl
|
||||
#
|
||||
# adapted from the mod_python recipe by Jeremy Bingham
|
||||
#
|
||||
# Copyright:: 2008-2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
%w(libapache2-mod-perl2 libapache2-request-perl).each do |pkg|
|
||||
package pkg
|
||||
end
|
||||
if node['platform'] == 'ubuntu' && node['platform_version'].to_f <= 14.04
|
||||
package 'apache2-mpm-prefork'
|
||||
end
|
||||
if node['platform'] == 'debian' && node['platform_version'].to_f <= 8
|
||||
package 'apache2-mpm-prefork'
|
||||
end
|
||||
when 'suse'
|
||||
package 'apache2-mod_perl' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
package 'perl-Apache2-Request'
|
||||
when 'rhel', 'fedora', 'amazon'
|
||||
package 'mod_perl' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
package 'perl-libapreq2'
|
||||
when 'freebsd'
|
||||
if node['apache']['version'] == '2.4'
|
||||
package 'ap24-mod_perl2'
|
||||
else
|
||||
package 'ap22-mod_perl2'
|
||||
end
|
||||
package 'p5-libapreq2'
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/perl.conf" do
|
||||
content '# conf is under mods-available/perl.conf - apache2 cookbook\n'
|
||||
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
|
||||
end
|
||||
|
||||
apache_module 'perl'
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue