Replace cookbooks for IceHouse release
Change-Id: Ibb6bdd3ed7795b86f773f9cb6ce1dfffb9b79faf
This commit is contained in:
parent
f8c0b2b04c
commit
486c596323
@ -1,5 +1,99 @@
|
||||
## v1.7.0:
|
||||
apache2 Cookbook Changelog
|
||||
==========================
|
||||
This file is used to list changes made in each version of the apache2 cookbook.
|
||||
|
||||
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.opscode.com/browse/COOK-4076)** - foodcritic: dependencies are not defined properly
|
||||
- **[COOK-2572](https://tickets.opscode.com/browse/COOK-2572)** - Add mod_pagespeed recipe to apache2
|
||||
|
||||
### Bug
|
||||
- **[COOK-4043](https://tickets.opscode.com/browse/COOK-4043)** - apache2 cookbook does not depend on 'iptables'
|
||||
- **[COOK-3919](https://tickets.opscode.com/browse/COOK-3919)** - Move the default pidfile for apache2 on Ubuntu 13.10 or greater
|
||||
- **[COOK-3863](https://tickets.opscode.com/browse/COOK-3863)** - Add recipe for mod_jk
|
||||
- **[COOK-3804](https://tickets.opscode.com/browse/COOK-3804)** - Fix incorrect datatype for apache/default_modules, use recipes option in metadata
|
||||
- **[COOK-3800](https://tickets.opscode.com/browse/COOK-3800)** - Cannot load modules that use non-standard module identifiers
|
||||
- **[COOK-1689](https://tickets.opscode.com/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.opscode.com/browse/COOK-3769)** - Fix a critical bug where the `apache_module` could not enable modules
|
||||
|
||||
|
||||
v1.8.2
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3766](https://tickets.opscode.com/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.opscode.com/browse/COOK-3680)** - Update template paths
|
||||
- **[COOK-3570](https://tickets.opscode.com/browse/COOK-3570)** - Apache cookbook breaks on RHEL / CentOS 6
|
||||
- **[COOK-2944](https://tickets.opscode.com/browse/COOK-2944)** - Fix foodcritic failures
|
||||
- **[COOK-2893](https://tickets.opscode.com/browse/COOK-2893)** - Improve mod_auth_openid recipe with guards and idempotency
|
||||
- **[COOK-2758](https://tickets.opscode.com/browse/COOK-2758)** - Fix use of non-existent attribute
|
||||
|
||||
### New Feature
|
||||
- **[COOK-3665](https://tickets.opscode.com/browse/COOK-3665)** - Add recipe for mod_userdir
|
||||
- **[COOK-3646](https://tickets.opscode.com/browse/COOK-3646)** - Add recipe for mod_cloudflare
|
||||
- **[COOK-3213](https://tickets.opscode.com/browse/COOK-3213)** - Add recipe for mod_info
|
||||
|
||||
### Improvement
|
||||
- **[COOK-3656](https://tickets.opscode.com/browse/COOK-3656)** - Parameterize apache2 binary
|
||||
- **[COOK-3562](https://tickets.opscode.com/browse/COOK-3562)** - Allow mod_proxy settings to be configured as attributes
|
||||
- **[COOK-3326](https://tickets.opscode.com/browse/COOK-3326)** - Fix default_test to use ServerTokens attribute
|
||||
- **[COOK-2635](https://tickets.opscode.com/browse/COOK-2635)** - Add support for SVG mime types
|
||||
- **[COOK-2598](https://tickets.opscode.com/browse/COOK-2598)** - FastCGI Module only works on Debian-based platforms
|
||||
- **[COOK-1984](https://tickets.opscode.com/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
|
||||
@ -11,173 +105,149 @@
|
||||
- [COOK-3184]: Add `mod_filter` recipe to Apache2-cookbook
|
||||
- [COOK-3236]: Add `mod_action` recipe to Apache2-cookbook
|
||||
|
||||
## v1.6.6:
|
||||
|
||||
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-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
|
||||
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
|
||||
|
||||
* [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.6.0:
|
||||
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-2372] - apache2 mpm_worker: add ServerLimit attribute (default
|
||||
to 16)
|
||||
- [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.5.0:
|
||||
v1.4.2
|
||||
------
|
||||
- [COOK-1721] - fix logrotate recipe
|
||||
|
||||
**NOTE** 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.
|
||||
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
|
||||
|
||||
* [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.3.2
|
||||
------
|
||||
- [COOK-1804] - fix `web_app` definition parameter so site can be disabled.
|
||||
|
||||
## v1.4.2:
|
||||
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
|
||||
|
||||
* [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:
|
||||
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
|
||||
- [COOK-1466] - add `mod_auth_cas` recipe
|
||||
- [COOK-1609] - apache2 changes ports.conf twice per run when using apache2::mod_ssl
|
||||
|
||||
## v1.1.12:
|
||||
v1.1.12
|
||||
-------
|
||||
- [COOK-1436] - restore apache2 web_app definition
|
||||
- [COOK-1356] - allow ExtendedStatus via attribute
|
||||
- [COOK-1403] - add mod_fastcgi recipe
|
||||
|
||||
* [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.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:
|
||||
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
|
||||
- [COOK-1025] - freebsd support in mod_php5 recipe
|
||||
|
||||
## v1.1.4:
|
||||
v1.1.4
|
||||
------
|
||||
- [COOK-1100] - support amazon linux
|
||||
|
||||
* [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.2:
|
||||
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
|
||||
|
||||
* [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.0.8
|
||||
------
|
||||
- COOK-548 - directory resource doesn't have backup parameter
|
||||
|
||||
## v1.1.0:
|
||||
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.
|
||||
|
||||
* [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.4
|
||||
------
|
||||
- COOK-859 - don't hardcode module paths
|
||||
|
||||
## v1.0.8:
|
||||
v1.0.2
|
||||
------
|
||||
- Tickets resolved in this release: COOK-788, COOK-782, COOK-780
|
||||
|
||||
* 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 :).
|
||||
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 :).
|
||||
|
@ -1,257 +0,0 @@
|
||||
# Contributing to Opscode Cookbooks
|
||||
|
||||
We are glad you want to contribute to Opscode Cookbooks! The first
|
||||
step is the desire to improve the project.
|
||||
|
||||
You can find the answers to additional frequently asked questions
|
||||
[on the wiki](http://wiki.opscode.com/display/chef/How+to+Contribute).
|
||||
|
||||
You can find additional information about
|
||||
[contributing to cookbooks](http://wiki.opscode.com/display/chef/How+to+Contribute+to+Opscode+Cookbooks)
|
||||
on the wiki as well.
|
||||
|
||||
## Quick-contribute
|
||||
|
||||
* Create an account on our [bug tracker](http://tickets.opscode.com)
|
||||
* Sign our contributor agreement (CLA)
|
||||
[ online](https://secure.echosign.com/public/hostedForm?formid=PJIF5694K6L)
|
||||
(keep reading if you're contributing on behalf of your employer)
|
||||
* Create a ticket for your change on the
|
||||
[bug tracker](http://tickets.opscode.com)
|
||||
* Link to your patch as a rebased git branch or pull request from the
|
||||
ticket
|
||||
* Resolve the ticket as fixed
|
||||
|
||||
We regularly review contributions and will get back to you if we have
|
||||
any suggestions or concerns.
|
||||
|
||||
## The Apache License and the CLA/CCLA
|
||||
|
||||
Licensing is very important to open source projects, it helps ensure
|
||||
the software continues to be available under the terms that the author
|
||||
desired. Chef uses the Apache 2.0 license to strike a balance between
|
||||
open contribution and allowing you to use the software however you
|
||||
would like to.
|
||||
|
||||
The license tells you what rights you have that are provided by the
|
||||
copyright holder. It is important that the contributor fully
|
||||
understands what rights they are licensing and agrees to them.
|
||||
Sometimes the copyright holder isn't the contributor, most often when
|
||||
the contributor is doing work for a company.
|
||||
|
||||
To make a good faith effort to ensure these criteria are met, Opscode
|
||||
requires a Contributor License Agreement (CLA) or a Corporate
|
||||
Contributor License Agreement (CCLA) for all contributions. This is
|
||||
without exception due to some matters not being related to copyright
|
||||
and to avoid having to continually check with our lawyers about small
|
||||
patches.
|
||||
|
||||
It only takes a few minutes to complete a CLA, and you retain the
|
||||
copyright to your contribution.
|
||||
|
||||
You can complete our contributor agreement (CLA)
|
||||
[ online](https://secure.echosign.com/public/hostedForm?formid=PJIF5694K6L).
|
||||
If you're contributing on behalf of your employer, have your employer
|
||||
fill out our
|
||||
[Corporate CLA](https://secure.echosign.com/public/hostedForm?formid=PIE6C7AX856)
|
||||
instead.
|
||||
|
||||
## Ticket Tracker (JIRA)
|
||||
|
||||
The [ticket tracker](http://tickets.opscode.com) is the most important
|
||||
documentation for the code base. It provides significant historical
|
||||
information, such as:
|
||||
|
||||
* Which release a bug fix is included in
|
||||
* Discussion regarding the design and merits of features
|
||||
* Error output to aid in finding similar bugs
|
||||
|
||||
Each ticket should aim to fix one bug or add one feature.
|
||||
|
||||
## Using git
|
||||
|
||||
You can get a quick copy of the repository for this cookbook by
|
||||
running `git clone
|
||||
git://github.com/opscode-coobkooks/COOKBOOKNAME.git`.
|
||||
|
||||
For collaboration purposes, it is best if you create a Github account
|
||||
and fork the repository to your own account. Once you do this you will
|
||||
be able to push your changes to your Github repository for others to
|
||||
see and use.
|
||||
|
||||
If you have another repository in your GitHub account named the same
|
||||
as the cookbook, we suggest you suffix the repository with -cookbook.
|
||||
|
||||
### Branches and Commits
|
||||
|
||||
You should submit your patch as a git branch named after the ticket,
|
||||
such as COOK-1337. This is called a _topic branch_ and allows users to
|
||||
associate a branch of code with the ticket.
|
||||
|
||||
It is a best practice to have your commit message have a _summary
|
||||
line_ that includes the ticket number, 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.
|
||||
|
||||
[COOK-1757] - platform_family and style
|
||||
|
||||
* use platform_family for platform checking
|
||||
* update notifies syntax to "resource_type[resource_name]" instead of
|
||||
resources() lookup
|
||||
* COOK-692 - delete config files dropped off by packages in conf.d
|
||||
* dropped debian 4 support because all other platforms have the same
|
||||
values, and it is older than "old stable" debian release
|
||||
|
||||
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
|
||||
|
||||
All of Opscode's open source cookbook projects are available on
|
||||
[Github](http://www.github.com/opscode-cookbooks).
|
||||
|
||||
We don't require you to use Github, and we will even take patch diffs
|
||||
attached to tickets on the 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.
|
||||
|
||||
If you do choose to use a pull request, please provide a link to the
|
||||
pull request from the ticket __and__ a link to the ticket from the
|
||||
pull request. Because pull requests only have two states, open and
|
||||
closed, we can't easily filter pull requests that are waiting for a
|
||||
reply from the author for various reasons.
|
||||
|
||||
### More information
|
||||
|
||||
Additional help with git is available on the
|
||||
[Working with Git](http://wiki.opscode.com/display/chef/Working+with+Git)
|
||||
wiki page.
|
||||
|
||||
## Functional and Unit Tests
|
||||
|
||||
This cookbook is set up to run tests under
|
||||
[Opscode's test-kitchen](https://github.com/opscode/test-kitchen). It
|
||||
uses minitest-chef 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 Opscode](https://github.com/opscode/bento).
|
||||
Because Test Kitchen creates VirtualBox machines and runs through
|
||||
every configuration in the Kitchenfile, 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 the #chef-hacking IRC channel.
|
||||
|
||||
## Code Review
|
||||
|
||||
Opscode regularly reviews code contributions and provides suggestions
|
||||
for improvement in the code itself or the implementation.
|
||||
|
||||
We find contributions by searching the ticket tracker for _resolved_
|
||||
tickets with a status of _fixed_. If we have feedback we will reopen
|
||||
the ticket and you should resolve it again when you've made the
|
||||
changes or have a response to our feedback. When we believe the patch
|
||||
is ready to be merged, we will tag the _Code Reviewed_ field with
|
||||
_Reviewed_.
|
||||
|
||||
Depending on the project, these tickets are then merged within a week
|
||||
or two, depending on the current release cycle.
|
||||
|
||||
## Release Cycle
|
||||
|
||||
The versioning for Opscode Cookbook projects is X.Y.Z.
|
||||
|
||||
* X is a major release, which may not be fully compatible with prior
|
||||
major releases
|
||||
* Y is a minor release, which adds both new features and bug fixes
|
||||
* Z is a patch release, which adds just bug fixes
|
||||
|
||||
A released version of a cookbook will end in an even number, e.g.
|
||||
"1.2.4" or "0.8.0". When development for the next version of the
|
||||
cookbook begins, the "Z" patch number is incremented to the next odd
|
||||
number, however the next release of the cookbook may be a major or
|
||||
minor incrementing version.
|
||||
|
||||
Releases of Opscode's cookbooks are usually announced on the Chef user
|
||||
mailing list. Releases of several cookbooks may be batched together
|
||||
and announced on the [Opscode Blog](http://www.opscode.com/blog).
|
||||
|
||||
## Working with the community
|
||||
|
||||
These resources will help you learn more about Chef and connect to
|
||||
other members of the Chef community:
|
||||
|
||||
* [chef](http://lists.opscode.com/sympa/info/chef) and
|
||||
[chef-dev](http://lists.opscode.com/sympa/info/chef-dev) mailing
|
||||
lists
|
||||
* #chef and #chef-hacking IRC channels on irc.freenode.net
|
||||
* [Community Cookbook site](http://community.opscode.com)
|
||||
* [Chef wiki](http://wiki.opscode.com/display/chef)
|
||||
* Opscode Chef [product page](http://www.opscode.com/chef)
|
||||
|
||||
|
||||
## 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.opscode.com/sympa/info/chef-dev)
|
||||
or the
|
||||
[#chef-hacking IRC channel](http://community.opscode.com/chat/chef-hacking).
|
||||
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), and update the relevant
|
||||
COOK ticket. When writing commit messages, it is helpful for others if
|
||||
you indicate the COOK ticket. For example:
|
||||
|
||||
git commit -m '[COOK-1041] - Updated pool resource to correctly
|
||||
delete.'
|
||||
|
||||
Please do use [foodcritic](http://acrmp.github.com/foodcritic) 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, Opscode
|
||||
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.
|
||||
Opscode will update the CHANGELOG.md when releasing a new version of
|
||||
the cookbook.
|
@ -1,10 +0,0 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem 'cucumber', '~> 1.2.0'
|
||||
gem 'httparty', '~> 0.8.3'
|
||||
gem 'minitest', '~> 3.0.0'
|
||||
gem 'nokogiri', '~> 1.5.0'
|
||||
|
||||
group :kitchen do
|
||||
gem 'test-kitchen', '< 1.0'
|
||||
end
|
@ -1,5 +1,7 @@
|
||||
Description
|
||||
===========
|
||||
apache2 Cookbook
|
||||
================
|
||||
[](http://travis-ci.org/opscode-cookbooks/apache2)
|
||||
|
||||
|
||||
This cookbook provides a complete Debian/Ubuntu style Apache HTTPD
|
||||
configuration. Non-Debian based distributions such as Red Hat/CentOS,
|
||||
@ -150,6 +152,8 @@ 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
|
||||
@ -157,11 +161,13 @@ the top of the file.
|
||||
* `node['apache']['user']` - User Apache runs as
|
||||
* `node['apache']['group']` - Group Apache runs as
|
||||
* `node['apache']['binary']` - Apache httpd server daemon
|
||||
* `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. Defaults to true on redhat-family platforms
|
||||
* `node['apache']['default_site_enabled']` - Default site enabled. Default is false.
|
||||
* `node['apache']['ext_status']` - if true, enables ExtendedStatus for `mod_status`
|
||||
|
||||
General settings
|
||||
@ -170,12 +176,14 @@ General settings
|
||||
These are general settings used in recipes and templates. Default
|
||||
values are noted.
|
||||
|
||||
* `node['apache']['listen_addresses']` - Addresses that httpd should listen on. Default is any ("*").
|
||||
* `node['apache']['listen_ports']` - Ports that httpd should listen on. Default is port 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']['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`".
|
||||
|
||||
The modules listed in `default_modules` will be included as recipes in `recipe[apache::default]`.
|
||||
@ -413,13 +421,14 @@ 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_conf` 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/ssl.conf.erb`.
|
||||
Enable the ssl module, which also has a configuration template in `templates/default/mods/ssl.conf.erb`.
|
||||
|
||||
apache_module "ssl" do
|
||||
conf true
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: apache
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,102 +17,106 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['apache']['root_group'] = "root"
|
||||
default['apache']['root_group'] = 'root'
|
||||
|
||||
# Where the various parts of apache are
|
||||
case platform
|
||||
when "redhat", "centos", "scientific", "fedora", "suse", "amazon", "oracle"
|
||||
default['apache']['package'] = "httpd"
|
||||
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']['docroot_dir'] = "/var/www/html"
|
||||
default['apache']['cgibin_dir'] = "/var/www/cgi-bin"
|
||||
default['apache']['icondir'] = "/var/www/icons"
|
||||
default['apache']['cache_dir'] = "/var/cache/httpd"
|
||||
if node['platform_version'].to_f >= 6 then
|
||||
default['apache']['pid_file'] = "/var/run/httpd/httpd.pid"
|
||||
else
|
||||
default['apache']['pid_file'] = "/var/run/httpd.pid"
|
||||
end
|
||||
default['apache']['lib_dir'] = node['kernel']['machine'] =~ /^i[36]86$/ ? "/usr/lib/httpd" : "/usr/lib64/httpd"
|
||||
default['apache']['libexecdir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
case node['platform']
|
||||
when 'redhat', 'centos', 'scientific', 'fedora', 'suse', 'amazon', 'oracle'
|
||||
default['apache']['package'] = 'httpd'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
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']['docroot_dir'] = '/var/www/html'
|
||||
default['apache']['cgibin_dir'] = '/var/www/cgi-bin'
|
||||
default['apache']['icondir'] = '/var/www/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/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']['libexecdir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
default['apache']['default_site_enabled'] = false
|
||||
when "debian", "ubuntu"
|
||||
default['apache']['package'] = "apache2"
|
||||
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']['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"
|
||||
if node['platform_version'].to_f >= 14 then
|
||||
default['apache']['pid_file'] = "/var/run/apache2/apache2.pid"
|
||||
else
|
||||
default['apache']['pid_file'] = "/var/run/apache2.pid"
|
||||
end
|
||||
default['apache']['lib_dir'] = "/usr/lib/apache2"
|
||||
default['apache']['libexecdir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
when 'debian', 'ubuntu'
|
||||
default['apache']['package'] = 'apache2'
|
||||
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']['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']['pid_file'] = if node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 13.10
|
||||
'/var/run/apache2/apache2.pid'
|
||||
else
|
||||
'/var/run/apache2.pid'
|
||||
end
|
||||
default['apache']['lib_dir'] = '/usr/lib/apache2'
|
||||
default['apache']['libexecdir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
default['apache']['default_site_enabled'] = false
|
||||
when "arch"
|
||||
default['apache']['package'] = "apache"
|
||||
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']['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']['pid_file'] = "/var/run/httpd/httpd.pid"
|
||||
default['apache']['lib_dir'] = "/usr/lib/httpd"
|
||||
default['apache']['libexecdir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
when 'arch'
|
||||
default['apache']['package'] = 'apache'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
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']['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']['pid_file'] = '/var/run/httpd/httpd.pid'
|
||||
default['apache']['lib_dir'] = '/usr/lib/httpd'
|
||||
default['apache']['libexecdir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
default['apache']['default_site_enabled'] = false
|
||||
when "freebsd"
|
||||
default['apache']['package'] = "apache22"
|
||||
default['apache']['dir'] = "/usr/local/etc/apache22"
|
||||
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']['docroot_dir'] = "/usr/local/www/apache22/data"
|
||||
default['apache']['cgibin_dir'] = "/usr/local/www/apache22/cgi-bin"
|
||||
default['apache']['icondir'] = "/usr/local/www/apache22/icons"
|
||||
default['apache']['cache_dir'] = "/var/run/apache22"
|
||||
default['apache']['pid_file'] = "/var/run/httpd.pid"
|
||||
default['apache']['lib_dir'] = "/usr/local/libexec/apache22"
|
||||
default['apache']['libexecdir'] = node['apache']['lib_dir']
|
||||
when 'freebsd'
|
||||
default['apache']['package'] = 'apache22'
|
||||
default['apache']['perl_pkg'] = 'perl5'
|
||||
default['apache']['dir'] = '/usr/local/etc/apache22'
|
||||
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']['docroot_dir'] = '/usr/local/www/apache22/data'
|
||||
default['apache']['cgibin_dir'] = '/usr/local/www/apache22/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/local/www/apache22/icons'
|
||||
default['apache']['cache_dir'] = '/var/run/apache22'
|
||||
default['apache']['pid_file'] = '/var/run/httpd.pid'
|
||||
default['apache']['lib_dir'] = '/usr/local/libexec/apache22'
|
||||
default['apache']['libexecdir'] = node['apache']['lib_dir']
|
||||
default['apache']['default_site_enabled'] = false
|
||||
else
|
||||
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']['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']['pid_file'] = "logs/httpd.pid"
|
||||
default['apache']['lib_dir'] = "/usr/lib/apache2"
|
||||
default['apache']['libexecdir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
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']['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']['pid_file'] = 'logs/httpd.pid'
|
||||
default['apache']['lib_dir'] = '/usr/lib/apache2'
|
||||
default['apache']['libexecdir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
default['apache']['default_site_enabled'] = false
|
||||
end
|
||||
|
||||
@ -122,51 +126,61 @@ end
|
||||
###
|
||||
|
||||
# General settings
|
||||
default['apache']['listen_ports'] = ["80"]
|
||||
default['apache']['contact'] = "ops@example.com"
|
||||
default['apache']['timeout'] = 300
|
||||
default['apache']['keepalive'] = "On"
|
||||
default['apache']['listen_addresses'] = %w[*]
|
||||
default['apache']['listen_ports'] = %w[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']['keepalivetimeout'] = 5
|
||||
default['apache']['sysconfig_additional_params'] = {}
|
||||
|
||||
# Security
|
||||
default['apache']['servertokens'] = "Prod"
|
||||
default['apache']['serversignature'] = "On"
|
||||
default['apache']['traceenable'] = "On"
|
||||
default['apache']['servertokens'] = 'Prod'
|
||||
default['apache']['serversignature'] = 'On'
|
||||
default['apache']['traceenable'] = 'On'
|
||||
|
||||
# mod_auth_openids
|
||||
default['apache']['allowed_openids'] = Array.new
|
||||
default['apache']['allowed_openids'] = []
|
||||
|
||||
# mod_status Allow list, space seprated list of allowed entries.
|
||||
default['apache']['status_allow_list'] = "localhost ip6-localhost"
|
||||
# mod_status Allow list, space seprated list of allowed entries.
|
||||
default['apache']['status_allow_list'] = 'localhost ip6-localhost'
|
||||
|
||||
# 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'] = 'localhost ip6-localhost'
|
||||
|
||||
# Prefork Attributes
|
||||
default['apache']['prefork']['startservers'] = 16
|
||||
default['apache']['prefork']['minspareservers'] = 16
|
||||
default['apache']['prefork']['maxspareservers'] = 32
|
||||
default['apache']['prefork']['serverlimit'] = 400
|
||||
default['apache']['prefork']['maxclients'] = 400
|
||||
default['apache']['prefork']['maxrequestsperchild'] = 10000
|
||||
default['apache']['prefork']['startservers'] = 16
|
||||
default['apache']['prefork']['minspareservers'] = 16
|
||||
default['apache']['prefork']['maxspareservers'] = 32
|
||||
default['apache']['prefork']['serverlimit'] = 400
|
||||
default['apache']['prefork']['maxclients'] = 400
|
||||
default['apache']['prefork']['maxrequestsperchild'] = 10_000
|
||||
|
||||
# Worker Attributes
|
||||
default['apache']['worker']['startservers'] = 4
|
||||
default['apache']['worker']['serverlimit'] = 16
|
||||
default['apache']['worker']['maxclients'] = 1024
|
||||
default['apache']['worker']['minsparethreads'] = 64
|
||||
default['apache']['worker']['maxsparethreads'] = 192
|
||||
default['apache']['worker']['threadsperchild'] = 64
|
||||
default['apache']['worker']['startservers'] = 4
|
||||
default['apache']['worker']['serverlimit'] = 16
|
||||
default['apache']['worker']['maxclients'] = 1024
|
||||
default['apache']['worker']['minsparethreads'] = 64
|
||||
default['apache']['worker']['maxsparethreads'] = 192
|
||||
default['apache']['worker']['threadsperchild'] = 64
|
||||
default['apache']['worker']['maxrequestsperchild'] = 0
|
||||
|
||||
# mod_proxy settings
|
||||
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{
|
||||
default['apache']['default_modules'] = %w[
|
||||
status alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex
|
||||
dir env mime negotiation setenvif
|
||||
}
|
||||
]
|
||||
|
||||
%w{ log_config logio }.each do |log_mod|
|
||||
default['apache']['default_modules'] << log_mod if ["rhel", "fedora", "suse", "arch", "freebsd"].include?(node['platform_family'])
|
||||
%w[log_config logio].each do |log_mod|
|
||||
default['apache']['default_modules'] << log_mod if %w[rhel fedora suse arch freebsd].include?(node['platform_family'])
|
||||
end
|
||||
|
@ -1,2 +1,21 @@
|
||||
default['apache']['mod_auth_cas']['from_source'] = false
|
||||
default['apache']['mod_auth_cas']['source_revision'] = "v1.0.8.1"
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: mod_auth_cas
|
||||
#
|
||||
# Copyright 2013, Opscode, 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.8.1'
|
||||
|
@ -1,13 +1,14 @@
|
||||
#
|
||||
# Author:: Joshua Timberman <joshua@opscode.com>
|
||||
# Copyright:: Copyright (c) 2011, Opscode, Inc.
|
||||
# License:: Apache License, Version 2.0
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: mod_auth_cas
|
||||
#
|
||||
# Copyright 2013, Opscode, 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
|
||||
# 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,
|
||||
@ -16,16 +17,16 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['apache']['mod_auth_openid']['ref'] = "95043901eab868400937642d9bc55d17e9dd069f"
|
||||
default['apache']['mod_auth_openid']['ref'] = '95043901eab868400937642d9bc55d17e9dd069f'
|
||||
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']['cache_dir'] = '/var/cache/mod_auth_openid'
|
||||
default['apache']['mod_auth_openid']['dblocation'] = "#{node['apache']['mod_auth_openid']['cache_dir']}/mod_auth_openid.db"
|
||||
|
||||
case node['platform_family']
|
||||
when "freebsd"
|
||||
when 'freebsd'
|
||||
default['apache']['mod_auth_openid']['configure_flags'] = [
|
||||
"CPPFLAGS=-I/usr/local/include",
|
||||
"LDFLAGS=-I/usr/local/lib -lsqlite3"
|
||||
'CPPFLAGS=-I/usr/local/include',
|
||||
'LDFLAGS=-I/usr/local/lib -lsqlite3'
|
||||
]
|
||||
else
|
||||
default['apache']['mod_auth_openid']['configure_flags'] = []
|
||||
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Cookbook Name:: openstack-ops-messaging
|
||||
# Recipe:: default
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: mod_fastcgi
|
||||
#
|
||||
# Copyright 2013, Opscode, Inc.
|
||||
#
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "openstack-ops-messaging::#{node['openstack']['messaging']['service']}"
|
||||
default['apache']['mod_fastcgi']['download_url'] = 'http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz'
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apt_test
|
||||
# Recipe:: default
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: mod_pagespeed
|
||||
#
|
||||
# Copyright 2012, Opscode, Inc.
|
||||
# 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.
|
||||
@ -17,13 +17,9 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
module Helpers
|
||||
module AptTest
|
||||
require 'chef/mixin/shell_out'
|
||||
include Chef::Mixin::ShellOut
|
||||
include MiniTest::Chef::Assertions
|
||||
include MiniTest::Chef::Context
|
||||
include MiniTest::Chef::Resources
|
||||
|
||||
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
|
||||
end
|
@ -1,13 +1,14 @@
|
||||
#
|
||||
# Author:: Nathan L Smith <nlloyds@gmail.com>
|
||||
# Copyright:: Copyright (c) 2012, Opscode, Inc.
|
||||
# License:: Apache License, Version 2.0
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: mod_ssl
|
||||
#
|
||||
# Copyright 2012-2013, Opscode, 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
|
||||
# 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,
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: apache_conf
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-20013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,8 +19,8 @@
|
||||
|
||||
define :apache_conf do
|
||||
template "#{node['apache']['dir']}/mods-available/#{params[:name]}.conf" do
|
||||
source "mods/#{params[:name]}.conf.erb"
|
||||
notifies :restart, "service[apache2]"
|
||||
mode 0644
|
||||
source "mods/#{params[:name]}.conf.erb"
|
||||
mode '0644'
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: apache_module
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -18,36 +18,35 @@
|
||||
#
|
||||
|
||||
define :apache_module, :enable => true, :conf => false do
|
||||
include_recipe "apache2"
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
params[:filename] = params[:filename] || "mod_#{params[:name]}.so"
|
||||
params[:filename] = params[:filename] || "mod_#{params[:name]}.so"
|
||||
params[:module_path] = params[:module_path] || "#{node['apache']['libexecdir']}/#{params[:filename]}"
|
||||
params[:identifier] = params[:identifier] || "#{params[:name]}_module"
|
||||
|
||||
if params[:conf]
|
||||
apache_conf params[:name]
|
||||
end
|
||||
apache_conf params[:name] if params[:conf]
|
||||
|
||||
if platform_family?("rhel", "fedora", "arch", "suse", "freebsd")
|
||||
if platform_family?('rhel', 'fedora', 'arch', 'suse', 'freebsd')
|
||||
file "#{node['apache']['dir']}/mods-available/#{params[:name]}.load" do
|
||||
content "LoadModule #{params[:name]}_module #{params[:module_path]}\n"
|
||||
mode 0644
|
||||
content "LoadModule #{params[:identifier]} #{params[:module_path]}\n"
|
||||
mode '0644'
|
||||
end
|
||||
end
|
||||
|
||||
if params[:enable]
|
||||
execute "a2enmod #{params[:name]}" do
|
||||
command "/usr/sbin/a2enmod #{params[:name]}"
|
||||
notifies :restart, "service[apache2]"
|
||||
not_if do (::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") and
|
||||
((::File.exists?("#{node['apache']['dir']}/mods-available/#{params[:name]}.conf"))?
|
||||
(::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.conf")):(true)))
|
||||
notifies :restart, 'service[apache2]'
|
||||
not_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") &&
|
||||
(::File.exists?("#{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]}"
|
||||
notifies :restart, "service[apache2]"
|
||||
only_if do ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") end
|
||||
notifies :restart, 'service[apache2]'
|
||||
only_if { ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: apache_site
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -18,24 +18,24 @@
|
||||
#
|
||||
|
||||
define :apache_site, :enable => true do
|
||||
include_recipe "apache2"
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
if params[:enable]
|
||||
execute "a2ensite #{params[:name]}" do
|
||||
command "/usr/sbin/a2ensite #{params[:name]}"
|
||||
notifies :restart, resources(:service => "apache2")
|
||||
notifies :restart, 'service[apache2]'
|
||||
not_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/#{params[:name]}") or
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/#{params[:name]}") ||
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/000-#{params[:name]}")
|
||||
end
|
||||
only_if do ::File.exists?("#{node['apache']['dir']}/sites-available/#{params[:name]}") end
|
||||
only_if { ::File.exists?("#{node['apache']['dir']}/sites-available/#{params[:name]}") }
|
||||
end
|
||||
else
|
||||
execute "a2dissite #{params[:name]}" do
|
||||
command "/usr/sbin/a2dissite #{params[:name]}"
|
||||
notifies :restart, resources(:service => "apache2")
|
||||
notifies :restart, 'service[apache2]'
|
||||
only_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/#{params[:name]}") or
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/#{params[:name]}") ||
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/000-#{params[:name]}")
|
||||
end
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: web_app
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,29 +17,27 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
define :web_app, :template => "web_app.conf.erb", :enable => true do
|
||||
define :web_app, :template => 'web_app.conf.erb', :enable => true do
|
||||
|
||||
application_name = params[:name]
|
||||
|
||||
include_recipe "apache2"
|
||||
include_recipe "apache2::mod_rewrite"
|
||||
include_recipe "apache2::mod_deflate"
|
||||
include_recipe "apache2::mod_headers"
|
||||
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]
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
mode 0644
|
||||
if params[:cookbook]
|
||||
cookbook params[:cookbook]
|
||||
end
|
||||
source params[:template]
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
cookbook params[:cookbook] if params[:cookbook]
|
||||
variables(
|
||||
:application_name => application_name,
|
||||
:params => params
|
||||
:params => params
|
||||
)
|
||||
if ::File.exists?("#{node['apache']['dir']}/sites-enabled/#{application_name}.conf")
|
||||
notifies :reload, resources(:service => "apache2"), :delayed
|
||||
notifies :reload, 'service[apache2]'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
=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.
|
||||
|
@ -16,7 +16,7 @@ describe 'apache2::default' do
|
||||
end
|
||||
|
||||
it 'creates the conf.d directory' do
|
||||
directory("#{node['apache']['dir']}/conf.d").must_exist.with(:mode, "755")
|
||||
directory("#{node['apache']['dir']}/conf.d").must_exist.with(:mode, '755')
|
||||
end
|
||||
|
||||
it 'creates the logs directory' do
|
||||
@ -36,7 +36,7 @@ describe 'apache2::default' do
|
||||
end
|
||||
|
||||
it 'reports server name only, not detailed version info' do
|
||||
assert_match(/^ServerTokens Prod *$/, File.read("#{node['apache']['dir']}/conf.d/security"))
|
||||
assert_match(/^ServerTokens #{node['apache']['servertokens']} *$/, File.read("#{node['apache']['dir']}/conf.d/security"))
|
||||
end
|
||||
|
||||
it 'listens on port 80' do
|
||||
@ -50,10 +50,10 @@ describe 'apache2::default' do
|
||||
end
|
||||
|
||||
it 'reports server name only, not detailed version info' do
|
||||
file("#{node['apache']['dir']}/conf.d/security").must_match(/^ServerTokens Prod *$/)
|
||||
file("#{node['apache']['dir']}/conf.d/security").must_match(/^ServerTokens #{node['apache']['servertokens']} *$/)
|
||||
end
|
||||
|
||||
it "enables default_modules" do
|
||||
it 'enables default_modules' do
|
||||
node['apache']['default_modules'].each do |a2mod|
|
||||
apache_enabled_modules.must_include "#{a2mod}_module"
|
||||
end
|
||||
@ -73,5 +73,4 @@ describe 'apache2::default' do
|
||||
it { config.must_include "Include #{node['apache']['dir']}/conf.d/" }
|
||||
it { apache_config_parses? }
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -17,15 +17,15 @@
|
||||
|
||||
require File.expand_path('../support/helpers', __FILE__)
|
||||
|
||||
describe "apache2::god_monitor" do
|
||||
describe 'apache2::god_monitor' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'starts god service to supervise apache2' do
|
||||
service("god").must_be_running
|
||||
service('god').must_be_running
|
||||
end
|
||||
|
||||
it 'creates the god service template for apache' do
|
||||
file("/etc/god/conf.d/apache2.god").must_exist
|
||||
file('/etc/god/conf.d/apache2.god').must_exist
|
||||
end
|
||||
|
||||
it 'starts an apache2 service that works like a regular service' do
|
||||
|
@ -4,12 +4,12 @@ describe 'apache2::mod_apreq2' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'enables apreq_module' do
|
||||
apache_enabled_modules.must_include "apreq_module"
|
||||
apache_enabled_modules.must_include 'apreq_module'
|
||||
end
|
||||
|
||||
it 'symlinks the module on EL' do
|
||||
skip unless %w{rhel fedora}.include?(node['platform_family'])
|
||||
libdir = node['kernel']['machine'] == 'x86_64' ? "lib64" : "lib"
|
||||
skip unless %w[rhel fedora].include?(node['platform_family'])
|
||||
libdir = node['kernel']['machine'] == 'x86_64' ? 'lib64' : 'lib'
|
||||
link(
|
||||
"/usr/#{libdir}/httpd/modules/mod_apreq.so"
|
||||
).must_exist.with(
|
||||
|
@ -1,11 +1,10 @@
|
||||
require File.expand_path('../support/helpers', __FILE__)
|
||||
|
||||
describe "apache2::mod_auth_cas" do
|
||||
describe 'apache2::mod_auth_cas' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'enables auth_cas_module' do
|
||||
skip if %w{rhel fedora}.include?(node['platform_family']) && node['platform_version'].to_f > 6.0
|
||||
apache_enabled_modules.must_include "auth_cas_module"
|
||||
skip if %w[rhel fedora].include?(node['platform_family']) && node['platform_version'].to_f > 6.0
|
||||
apache_enabled_modules.must_include 'auth_cas_module'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -4,34 +4,33 @@ require 'pathname'
|
||||
describe 'apache2::mod_auth_openid' do
|
||||
include Helpers::Apache
|
||||
|
||||
it "installs the opekele library" do
|
||||
it 'installs the opekele library' do
|
||||
lib_dir = Pathname.new(node['apache']['lib_dir']).dirname.to_s
|
||||
file("#{lib_dir}/libopkele.so").must_exist
|
||||
end
|
||||
|
||||
it "does not add the module to httpd.conf" do
|
||||
it 'does not add the module to httpd.conf' do
|
||||
conffile = case node['platform']
|
||||
when 'debian', 'ubuntu'
|
||||
"apache2.conf"
|
||||
when "redhat", "centos", "scientific", "fedora", "arch", "amazon"
|
||||
"conf/httpd.conf"
|
||||
when "freebsd"
|
||||
"httpd.conf"
|
||||
'apache2.conf'
|
||||
when 'redhat', 'centos', 'scientific', 'fedora', 'arch', 'amazon'
|
||||
'conf/httpd.conf'
|
||||
when 'freebsd'
|
||||
'httpd.conf'
|
||||
end
|
||||
httpd_config = File.read(File.join(node['apache']['dir'], conffile))
|
||||
refute_match /^LoadModule authopenid_module /, httpd_config
|
||||
end
|
||||
|
||||
it "creates a cache directory for the module" do
|
||||
it 'creates a cache directory for the module' do
|
||||
directory(node['apache']['mod_auth_openid']['cache_dir']).must_exist.with(:owner, node['apache']['user'])
|
||||
end
|
||||
|
||||
it "ensures the db file is writable by apache" do
|
||||
file(node['apache']['mod_auth_openid']['dblocation']).must_exist.with(:owner, node['apache']['user']).and(:mode, "644")
|
||||
it 'ensures the db file is writable by apache' do
|
||||
file(node['apache']['mod_auth_openid']['dblocation']).must_exist.with(:owner, node['apache']['user']).and(:mode, '644')
|
||||
end
|
||||
|
||||
it 'enables authopenid_module' do
|
||||
apache_enabled_modules.must_include "authopenid_module"
|
||||
apache_enabled_modules.must_include 'authopenid_module'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -9,5 +9,4 @@ describe 'apache2::mod_cgi' do
|
||||
apache_enabled_modules.include?('cgid_module')
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -4,11 +4,10 @@ describe 'apache2::mod_dav_svn' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'enables dav_svn_module' do
|
||||
apache_enabled_modules.must_include "dav_svn_module"
|
||||
apache_enabled_modules.must_include('dav_svn_module')
|
||||
end
|
||||
|
||||
it 'enables dav_module' do
|
||||
apache_enabled_modules.must_include "dav_module"
|
||||
apache_enabled_modules.must_include('dav_module')
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -1,11 +1,10 @@
|
||||
require File.expand_path('../support/helpers', __FILE__)
|
||||
|
||||
describe "apache2::mod_fastcgi" do
|
||||
describe 'apache2::mod_fastcgi' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'enables fastcgi_module' do
|
||||
skip if %w{rhel fedora}.include?(node['platform_family'])
|
||||
apache_enabled_modules.must_include "fastcgi_module"
|
||||
apache_enabled_modules.must_include 'fastcgi_module'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -4,12 +4,11 @@ describe 'apache2::mod_include' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'enables include_module' do
|
||||
apache_enabled_modules.must_include "include_module"
|
||||
apache_enabled_modules.must_include 'include_module'
|
||||
end
|
||||
|
||||
it 'drops off the include module configuration' do
|
||||
assert_match(/AddType text\/html .shtml/, File.read("#{node['apache']['dir']}/mods-enabled/include.conf"))
|
||||
assert_match(/AddOutputFilter INCLUDES .shtml/, File.read("#{node['apache']['dir']}/mods-enabled/include.conf"))
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -4,7 +4,7 @@ describe 'apache2::mod_perl' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'enables perl_module' do
|
||||
apache_enabled_modules.must_include "perl_module"
|
||||
apache_enabled_modules.must_include('perl_module')
|
||||
end
|
||||
|
||||
it 'installs the apache request library' do
|
||||
@ -14,5 +14,4 @@ describe 'apache2::mod_perl' do
|
||||
end
|
||||
package(req_pkg).must_be_installed
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -4,10 +4,10 @@ describe 'apache2::mod_php5' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'enables php5_module' do
|
||||
apache_enabled_modules.must_include "php5_module"
|
||||
apache_enabled_modules.must_include('php5_module')
|
||||
end
|
||||
|
||||
it "deletes the packaged php config if any" do
|
||||
it 'deletes the packaged php config if any' do
|
||||
file("#{node['apache']['dir']}/conf.d/php.conf").wont_exist
|
||||
end
|
||||
end
|
||||
|
@ -4,7 +4,6 @@ describe 'apache2::mod_python' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'enables python_module' do
|
||||
apache_enabled_modules.must_include "python_module"
|
||||
apache_enabled_modules.must_include('python_module')
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -4,25 +4,26 @@ describe 'apache2::mod_ssl' do
|
||||
include Helpers::Apache
|
||||
|
||||
it 'installs the mod_ssl package on RHEL distributions' do
|
||||
skip unless ["rhel", "fedora"].include? node['platform_family']
|
||||
package("mod_ssl").must_be_installed
|
||||
skip unless %w[rhel fedora].include?(node['platform_family'])
|
||||
package('mod_ssl').must_be_installed
|
||||
end
|
||||
|
||||
it 'enables ssl_module' do
|
||||
apache_enabled_modules.must_include "ssl_module"
|
||||
apache_enabled_modules.must_include 'ssl_module'
|
||||
end
|
||||
|
||||
it 'does not store SSL config in conf.d' do
|
||||
file("#{node['apache']['dir']}/conf.d/ssl.conf").wont_exist
|
||||
end
|
||||
|
||||
it "is configured to listen on port 443" do
|
||||
it 'is configured to listen on port 443' do
|
||||
apache_configured_ports.must_include(443)
|
||||
end
|
||||
|
||||
it 'configures SSLCiphersuit from an attribute' do
|
||||
assert_match(/^SSLCipherSuite #{node['apache']['mod_ssl']['cipher_suite']}$/,
|
||||
File.read("#{node['apache']['dir']}/mods-enabled/ssl.conf"))
|
||||
assert_match(
|
||||
/^SSLCipherSuite #{node['apache']['mod_ssl']['cipher_suite']}$/,
|
||||
File.read("#{node['apache']['dir']}/mods-enabled/ssl.conf")
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -1,4 +1,5 @@
|
||||
module Helpers
|
||||
# MiniTest helpers
|
||||
module Apache
|
||||
require 'chef/mixin/shell_out'
|
||||
include Chef::Mixin::ShellOut
|
||||
@ -30,9 +31,9 @@ module Helpers
|
||||
def apache_service
|
||||
service(
|
||||
case node['platform']
|
||||
when "debian", "ubuntu" then "apache2"
|
||||
when "freebsd" then "apache22"
|
||||
else "httpd"
|
||||
when 'debian', 'ubuntu' then 'apache2'
|
||||
when 'freebsd' then 'apache22'
|
||||
else 'httpd'
|
||||
end
|
||||
)
|
||||
end
|
||||
@ -40,26 +41,25 @@ module Helpers
|
||||
def config
|
||||
file(
|
||||
case node['platform']
|
||||
when "debian", "ubuntu" then "#{node['apache']['dir']}/apache2.conf"
|
||||
when "freebsd" then "#{node['apache']['dir']}/httpd.conf"
|
||||
when 'debian', 'ubuntu' then "#{node['apache']['dir']}/apache2.conf"
|
||||
when 'freebsd' then "#{node['apache']['dir']}/httpd.conf"
|
||||
else "#{node['apache']['dir']}/conf/httpd.conf"
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
def ran_recipe?(recipe)
|
||||
if Chef::VERSION < "11.0"
|
||||
if Chef::VERSION < '11.0'
|
||||
seen_recipes = node.run_state[:seen_recipes]
|
||||
recipes = seen_recipes.keys.each { |i| i }
|
||||
else
|
||||
recipes = run_context.loaded_recipes
|
||||
end
|
||||
if recipes.empty? and Chef::Config[:solo]
|
||||
#If you have roles listed in your run list they are NOT expanded
|
||||
recipes = node.run_list.map {|item| item.name if item.type == :recipe }
|
||||
if recipes.empty? && Chef::Config[:solo]
|
||||
# If you have roles listed in your run list they are NOT expanded
|
||||
recipes = node.run_list.map { |item| item.name if item.type == :recipe }
|
||||
end
|
||||
recipes.include?(recipe)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
367
chef/cookbooks/apache2/metadata.json
Normal file
367
chef/cookbooks/apache2/metadata.json
Normal file
File diff suppressed because one or more lines are too long
@ -1,213 +1,264 @@
|
||||
name "apache2"
|
||||
maintainer "Opscode, Inc."
|
||||
maintainer_email "cookbooks@opscode.com"
|
||||
license "Apache 2.0"
|
||||
description "Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions"
|
||||
name 'apache2'
|
||||
maintainer 'Opscode, Inc.'
|
||||
maintainer_email 'cookbooks@opscode.com'
|
||||
license 'Apache 2.0'
|
||||
description 'Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version "1.7.0"
|
||||
recipe "apache2", "Main Apache configuration"
|
||||
recipe "apache2::logrotate", "Rotate apache2 logs. Requires logrotate cookbook"
|
||||
recipe "apache2::mod_alias", "Apache module 'alias' with config file"
|
||||
recipe "apache2::mod_apreq2", "Apache module 'apreq'"
|
||||
recipe "apache2::mod_auth_basic", "Apache module 'auth_basic'"
|
||||
recipe "apache2::mod_auth_digest", "Apache module 'auth_digest'"
|
||||
recipe "apache2::mod_auth_openid", "Apache module 'authopenid'"
|
||||
recipe "apache2::mod_authn_file", "Apache module 'authn_file'"
|
||||
recipe "apache2::mod_authnz_ldap", "Apache module 'authnz_ldap'"
|
||||
recipe "apache2::mod_authz_default", "Apache module 'authz_default'"
|
||||
recipe "apache2::mod_authz_groupfile", "Apache module 'authz_groupfile'"
|
||||
recipe "apache2::mod_authz_host", "Apache module 'authz_host'"
|
||||
recipe "apache2::mod_authz_user", "Apache module 'authz_user'"
|
||||
recipe "apache2::mod_autoindex", "Apache module 'autoindex' with config file"
|
||||
recipe "apache2::mod_cgi", "Apache module 'cgi'"
|
||||
recipe "apache2::mod_dav", "Apache module 'dav'"
|
||||
recipe "apache2::mod_dav_svn", "Apache module 'dav_svn'"
|
||||
recipe "apache2::mod_deflate", "Apache module 'deflate' with config file"
|
||||
recipe "apache2::mod_dir", "Apache module 'dir' with config file"
|
||||
recipe "apache2::mod_env", "Apache module 'env'"
|
||||
recipe "apache2::mod_expires", "Apache module 'expires'"
|
||||
recipe "apache2::mod_fcgid", "Apache module 'fcgid', package on ubuntu/debian, rhel/centos, compile source on suse; with config file"
|
||||
recipe "apache2::mod_headers", "Apache module 'headers'"
|
||||
recipe "apache2::mod_include", "Apache module 'include'"
|
||||
recipe "apache2::mod_ldap", "Apache module 'ldap'"
|
||||
recipe "apache2::mod_log_config", "Apache module 'log_config'"
|
||||
recipe "apache2::mod_mime", "Apache module 'mime' with config file"
|
||||
recipe "apache2::mod_negotiation", "Apache module 'negotiation' with config file"
|
||||
recipe "apache2::mod_perl", "Apache module 'perl'"
|
||||
recipe "apache2::mod_php5", "Apache module 'php5'"
|
||||
recipe "apache2::mod_proxy", "Apache module 'proxy' with config file"
|
||||
recipe "apache2::mod_proxy_ajp", "Apache module 'proxy_ajp'"
|
||||
recipe "apache2::mod_proxy_balancer", "Apache module 'proxy_balancer'"
|
||||
recipe "apache2::mod_proxy_connect", "Apache module 'proxy_connect'"
|
||||
recipe "apache2::mod_proxy_http", "Apache module 'proxy_http'"
|
||||
recipe "apache2::mod_python", "Apache module 'python'"
|
||||
recipe "apache2::mod_rewrite", "Apache module 'rewrite'"
|
||||
recipe "apache2::mod_setenvif", "Apache module 'setenvif' with config file"
|
||||
recipe "apache2::mod_ssl", "Apache module 'ssl' with config file, adds port 443 to listen_ports"
|
||||
recipe "apache2::mod_status", "Apache module 'status' with config file"
|
||||
recipe "apache2::mod_xsendfile", "Apache module 'xsendfile'"
|
||||
version '1.9.6'
|
||||
recipe 'apache2', 'Main Apache configuration'
|
||||
recipe 'apache2::logrotate', 'Rotate apache2 logs. Requires logrotate cookbook'
|
||||
recipe 'apache2::mod_alias', 'Apache module "alias" with config file'
|
||||
recipe 'apache2::mod_apreq2', 'Apache module "apreq"'
|
||||
recipe 'apache2::mod_auth_basic', 'Apache module "auth_basic"'
|
||||
recipe 'apache2::mod_auth_digest', 'Apache module "auth_digest"'
|
||||
recipe 'apache2::mod_auth_openid', 'Apache module "authopenid"'
|
||||
recipe 'apache2::mod_authn_file', 'Apache module "authn_file"'
|
||||
recipe 'apache2::mod_authnz_ldap', 'Apache module "authnz_ldap"'
|
||||
recipe 'apache2::mod_authz_default', 'Apache module "authz_default"'
|
||||
recipe 'apache2::mod_authz_groupfile', 'Apache module "authz_groupfile"'
|
||||
recipe 'apache2::mod_authz_host', 'Apache module "authz_host"'
|
||||
recipe 'apache2::mod_authz_user', 'Apache module "authz_user"'
|
||||
recipe 'apache2::mod_autoindex', 'Apache module "autoindex" with config file'
|
||||
recipe 'apache2::mod_cgi', 'Apache module "cgi"'
|
||||
recipe 'apache2::mod_dav', 'Apache module "dav"'
|
||||
recipe 'apache2::mod_dav_svn', 'Apache module "dav_svn"'
|
||||
recipe 'apache2::mod_deflate', 'Apache module "deflate" with config file'
|
||||
recipe 'apache2::mod_dir', 'Apache module "dir" with config file'
|
||||
recipe 'apache2::mod_env', 'Apache module "env"'
|
||||
recipe 'apache2::mod_expires', 'Apache module "expires"'
|
||||
recipe 'apache2::mod_fcgid', 'Apache module "fcgid", package on ubuntu/debian, rhel/centos, compile source on suse; with config file'
|
||||
recipe 'apache2::mod_headers', 'Apache module "headers"'
|
||||
recipe 'apache2::mod_include', 'Apache module "include"'
|
||||
recipe 'apache2::mod_ldap', 'Apache module "ldap"'
|
||||
recipe 'apache2::mod_log_config', 'Apache module "log_config"'
|
||||
recipe 'apache2::mod_mime', 'Apache module "mime" with config file'
|
||||
recipe 'apache2::mod_negotiation', 'Apache module "negotiation" with config file'
|
||||
recipe 'apache2::mod_pagespeed', 'Apache module "pagespeed" with config file'
|
||||
recipe 'apache2::mod_perl', 'Apache module "perl"'
|
||||
recipe 'apache2::mod_php5', 'Apache module "php5"'
|
||||
recipe 'apache2::mod_proxy', 'Apache module "proxy" with config file'
|
||||
recipe 'apache2::mod_proxy_ajp', 'Apache module "proxy_ajp"'
|
||||
recipe 'apache2::mod_proxy_balancer', 'Apache module "proxy_balancer"'
|
||||
recipe 'apache2::mod_proxy_connect', 'Apache module "proxy_connect"'
|
||||
recipe 'apache2::mod_proxy_http', 'Apache module "proxy_http"'
|
||||
recipe 'apache2::mod_python', 'Apache module "python"'
|
||||
recipe 'apache2::mod_rewrite', 'Apache module "rewrite"'
|
||||
recipe 'apache2::mod_setenvif', 'Apache module "setenvif" with config file'
|
||||
recipe 'apache2::mod_ssl', 'Apache module "ssl" with config file, adds port 443 to listen_ports'
|
||||
recipe 'apache2::mod_status', 'Apache module "status" with config file'
|
||||
recipe 'apache2::mod_xsendfile', 'Apache module "xsendfile"'
|
||||
|
||||
%w{redhat centos scientific fedora debian ubuntu arch freebsd amazon}.each do |os|
|
||||
supports os
|
||||
end
|
||||
depends 'iptables'
|
||||
|
||||
attribute "apache",
|
||||
:display_name => "Apache Hash",
|
||||
:description => "Hash of Apache attributes",
|
||||
:type => "hash"
|
||||
supports 'amazon'
|
||||
supports 'arch'
|
||||
supports 'centos'
|
||||
supports 'debian'
|
||||
supports 'fedora'
|
||||
supports 'freebsd'
|
||||
supports 'redhat'
|
||||
supports 'scientific'
|
||||
supports 'ubuntu'
|
||||
|
||||
attribute "apache/dir",
|
||||
:display_name => "Apache Directory",
|
||||
:description => "Location for Apache configuration",
|
||||
:default => "/etc/apache2"
|
||||
depends 'logrotate'
|
||||
depends 'pacman'
|
||||
|
||||
attribute "apache/log_dir",
|
||||
:display_name => "Apache Log Directory",
|
||||
:description => "Location for Apache logs",
|
||||
:default => "/etc/apache2"
|
||||
attribute 'apache',
|
||||
:display_name => 'Apache Hash',
|
||||
:description => 'Hash of Apache attributes',
|
||||
:type => 'hash'
|
||||
|
||||
attribute "apache/user",
|
||||
:display_name => "Apache User",
|
||||
:description => "User Apache runs as",
|
||||
:default => "www-data"
|
||||
attribute 'apache/dir',
|
||||
:display_name => 'Apache Directory',
|
||||
:description => 'Location for Apache configuration',
|
||||
:default => '/etc/apache2',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/binary",
|
||||
:display_name => "Apache Binary",
|
||||
:description => "Apache server daemon program",
|
||||
:default => "/usr/sbin/apache2"
|
||||
attribute 'apache/log_dir',
|
||||
:display_name => 'Apache Log Directory',
|
||||
:description => 'Location for Apache logs',
|
||||
:default => '/etc/apache2',
|
||||
:recipes => ['apache2::default", "apache2::logrotate']
|
||||
|
||||
attribute "apache/icondir",
|
||||
:display_name => "Apache Icondir",
|
||||
:description => "Directory location for icons",
|
||||
:default => "/usr/share/apache2/icons"
|
||||
attribute 'apache/user',
|
||||
:display_name => 'Apache User',
|
||||
:description => 'User Apache runs as',
|
||||
:default => 'www-data',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/listen_ports",
|
||||
:display_name => "Apache Listen Ports",
|
||||
:description => "Ports that Apache should listen on",
|
||||
:type => "array",
|
||||
:default => ["80", "443"]
|
||||
attribute 'apache/binary',
|
||||
:display_name => 'Apache Binary',
|
||||
:description => 'Apache server daemon program',
|
||||
:default => '/usr/sbin/apache2',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/contact",
|
||||
:display_name => "Apache Contact",
|
||||
:description => "Email address of webmaster",
|
||||
:default => "ops@example.com"
|
||||
attribute 'apache/icondir',
|
||||
:display_name => 'Apache Icondir',
|
||||
:description => 'Directory location for icons',
|
||||
:default => '/usr/share/apache2/icons',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/timeout",
|
||||
:display_name => "Apache Timeout",
|
||||
:description => "Connection timeout value",
|
||||
:default => "300"
|
||||
attribute 'apache/listen_addresses',
|
||||
:display_name => 'Apache Listen Addresses',
|
||||
:description => 'Addresses that Apache should listen on',
|
||||
:type => 'array',
|
||||
:default => %w[*],
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/keepalive",
|
||||
:display_name => "Apache Keepalive",
|
||||
:description => "HTTP persistent connections",
|
||||
:default => "On"
|
||||
attribute 'apache/listen_ports',
|
||||
:display_name => 'Apache Listen Ports',
|
||||
:description => 'Ports that Apache should listen on',
|
||||
:type => 'array',
|
||||
:default => %w[80 443],
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/keepaliverequests",
|
||||
:display_name => "Apache Keepalive Requests",
|
||||
:description => "Number of requests allowed on a persistent connection",
|
||||
:default => "100"
|
||||
attribute 'apache/contact',
|
||||
:display_name => 'Apache Contact',
|
||||
:description => 'Email address of webmaster',
|
||||
:default => 'ops@example.com',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/keepalivetimeout",
|
||||
:display_name => "Apache Keepalive Timeout",
|
||||
:description => "Time to wait for requests on persistent connection",
|
||||
:default => "5"
|
||||
attribute 'apache/timeout',
|
||||
:display_name => 'Apache Timeout',
|
||||
:description => 'Connection timeout value',
|
||||
:default => '300',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/servertokens",
|
||||
:display_name => "Apache Server Tokens",
|
||||
:description => "Server response header",
|
||||
:default => "Prod"
|
||||
attribute 'apache/keepalive',
|
||||
:display_name => 'Apache Keepalive',
|
||||
:description => 'HTTP persistent connections',
|
||||
:default => 'On',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/serversignature",
|
||||
:display_name => "Apache Server Signature",
|
||||
:description => "Configure footer on server-generated documents",
|
||||
:default => "On"
|
||||
attribute 'apache/keepaliverequests',
|
||||
:display_name => 'Apache Keepalive Requests',
|
||||
:description => 'Number of requests allowed on a persistent connection',
|
||||
:default => '100',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/traceenable",
|
||||
:display_name => "Apache Trace Enable",
|
||||
:description => "Determine behavior of TRACE requests",
|
||||
:default => "On"
|
||||
attribute 'apache/keepalivetimeout',
|
||||
:display_name => 'Apache Keepalive Timeout',
|
||||
:description => 'Time to wait for requests on persistent connection',
|
||||
:default => '5',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/allowed_openids",
|
||||
:display_name => "Apache Allowed OpenIDs",
|
||||
:description => "Array of OpenIDs allowed to authenticate",
|
||||
:default => ""
|
||||
attribute 'apache/servertokens',
|
||||
:display_name => 'Apache Server Tokens',
|
||||
:description => 'Server response header',
|
||||
:default => 'Prod',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/prefork",
|
||||
:display_name => "Apache Prefork",
|
||||
:description => "Hash of Apache prefork tuning attributes.",
|
||||
:type => "hash"
|
||||
attribute 'apache/serversignature',
|
||||
:display_name => 'Apache Server Signature',
|
||||
:description => 'Configure footer on server-generated documents',
|
||||
:default => 'On',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/prefork/startservers",
|
||||
:display_name => "Apache Prefork MPM StartServers",
|
||||
:description => "Number of MPM servers to start",
|
||||
:default => "16"
|
||||
attribute 'apache/traceenable',
|
||||
:display_name => 'Apache Trace Enable',
|
||||
:description => 'Determine behavior of TRACE requests',
|
||||
:default => 'On',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/prefork/minspareservers",
|
||||
:display_name => "Apache Prefork MPM MinSpareServers",
|
||||
:description => "Minimum number of spare server processes",
|
||||
:default => "16"
|
||||
attribute 'apache/allowed_openids',
|
||||
:display_name => 'Apache Allowed OpenIDs',
|
||||
:description => 'Array of OpenIDs allowed to authenticate',
|
||||
:default => '',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/prefork/maxspareservers",
|
||||
:display_name => "Apache Prefork MPM MaxSpareServers",
|
||||
:description => "Maximum number of spare server processes",
|
||||
:default => "32"
|
||||
attribute 'apache/prefork',
|
||||
:display_name => 'Apache Prefork',
|
||||
:description => 'Hash of Apache prefork tuning attributes.',
|
||||
:type => 'hash',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/prefork/serverlimit",
|
||||
:display_name => "Apache Prefork MPM ServerLimit",
|
||||
:description => "Upper limit on configurable server processes",
|
||||
:default => "400"
|
||||
attribute 'apache/prefork/startservers',
|
||||
:display_name => 'Apache Prefork MPM StartServers',
|
||||
:description => 'Number of MPM servers to start',
|
||||
:default => '16',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/prefork/maxclients",
|
||||
:display_name => "Apache Prefork MPM MaxClients",
|
||||
:description => "Maximum number of simultaneous connections",
|
||||
:default => "400"
|
||||
attribute 'apache/prefork/minspareservers',
|
||||
:display_name => 'Apache Prefork MPM MinSpareServers',
|
||||
:description => 'Minimum number of spare server processes',
|
||||
:default => '16',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/prefork/maxrequestsperchild",
|
||||
:display_name => "Apache Prefork MPM MaxRequestsPerChild",
|
||||
:description => "Maximum number of request a child process will handle",
|
||||
:default => "10000"
|
||||
attribute 'apache/prefork/maxspareservers',
|
||||
:display_name => 'Apache Prefork MPM MaxSpareServers',
|
||||
:description => 'Maximum number of spare server processes',
|
||||
:default => '32',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/worker",
|
||||
:display_name => "Apache Worker",
|
||||
:description => "Hash of Apache prefork tuning attributes.",
|
||||
:type => "hash"
|
||||
attribute 'apache/prefork/serverlimit',
|
||||
:display_name => 'Apache Prefork MPM ServerLimit',
|
||||
:description => 'Upper limit on configurable server processes',
|
||||
:default => '400',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/worker/startservers",
|
||||
:display_name => "Apache Worker MPM StartServers",
|
||||
:description => "Initial number of server processes to start",
|
||||
:default => "4"
|
||||
attribute 'apache/prefork/maxclients',
|
||||
:display_name => 'Apache Prefork MPM MaxClients',
|
||||
:description => 'Maximum number of simultaneous connections',
|
||||
:default => '400',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/worker/maxclients",
|
||||
:display_name => "Apache Worker MPM MaxClients",
|
||||
:description => "Maximum number of simultaneous connections",
|
||||
:default => "1024"
|
||||
attribute 'apache/prefork/maxrequestsperchild',
|
||||
:display_name => 'Apache Prefork MPM MaxRequestsPerChild',
|
||||
:description => 'Maximum number of request a child process will handle',
|
||||
:default => '10000',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/worker/minsparethreads",
|
||||
:display_name => "Apache Worker MPM MinSpareThreads",
|
||||
:description => "Minimum number of spare worker threads",
|
||||
:default => "64"
|
||||
attribute 'apache/worker',
|
||||
:display_name => 'Apache Worker',
|
||||
:description => 'Hash of Apache prefork tuning attributes.',
|
||||
:type => 'hash',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/worker/maxsparethreads",
|
||||
:display_name => "Apache Worker MPM MaxSpareThreads",
|
||||
:description => "Maximum number of spare worker threads",
|
||||
:default => "192"
|
||||
attribute 'apache/worker/startservers',
|
||||
:display_name => 'Apache Worker MPM StartServers',
|
||||
:description => 'Initial number of server processes to start',
|
||||
:default => '4',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/worker/threadsperchild",
|
||||
:display_name => "Apache Worker MPM ThreadsPerChild",
|
||||
:description => "Constant number of worker threads in each server process",
|
||||
:default => "64"
|
||||
attribute 'apache/worker/maxclients',
|
||||
:display_name => 'Apache Worker MPM MaxClients',
|
||||
:description => 'Maximum number of simultaneous connections',
|
||||
:default => '1024',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/worker/maxrequestsperchild",
|
||||
:display_name => "Apache Worker MPM MaxRequestsPerChild",
|
||||
:description => "Maximum number of request a child process will handle",
|
||||
:default => "0"
|
||||
attribute 'apache/worker/minsparethreads',
|
||||
:display_name => 'Apache Worker MPM MinSpareThreads',
|
||||
:description => 'Minimum number of spare worker threads',
|
||||
:default => '64',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/default_modules",
|
||||
:display_name => "Apache Default Modules",
|
||||
:description => "Default modules to enable via recipes",
|
||||
:default => "status alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex dir env mime negotiation setenvif"
|
||||
attribute 'apache/worker/maxsparethreads',
|
||||
:display_name => 'Apache Worker MPM MaxSpareThreads',
|
||||
:description => 'Maximum number of spare worker threads',
|
||||
:default => '192',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute "apache/mod_ssl/cipher_suite",
|
||||
:display_name => "Apache mod_ssl Cipher Suite",
|
||||
:description => "String of SSL ciphers to use for SSLCipherSuite",
|
||||
:default => "RC4-SHA:HIGH:!ADH"
|
||||
attribute 'apache/worker/threadsperchild',
|
||||
:display_name => 'Apache Worker MPM ThreadsPerChild',
|
||||
:description => 'Constant number of worker threads in each server process',
|
||||
:default => '64',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute 'apache/worker/maxrequestsperchild',
|
||||
:display_name => 'Apache Worker MPM MaxRequestsPerChild',
|
||||
:description => 'Maximum number of request a child process will handle',
|
||||
:default => '0',
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute 'apache/default_modules',
|
||||
:display_name => 'Apache Default Modules',
|
||||
:description => 'Default modules to enable via recipes',
|
||||
:type => 'array',
|
||||
:default => %w[status alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex dir env mime negotiation setenvif],
|
||||
:recipes => ['apache2::default']
|
||||
|
||||
attribute 'apache/mod_ssl/cipher_suite',
|
||||
:display_name => 'Apache mod_ssl Cipher Suite',
|
||||
:description => 'String of SSL ciphers to use for SSLCipherSuite',
|
||||
:default => 'RC4-SHA:HIGH:!ADH',
|
||||
:recipes => ['apache2::default']
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,70 +17,70 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
package "apache2" do
|
||||
package 'apache2' do
|
||||
package_name node['apache']['package']
|
||||
end
|
||||
|
||||
service "apache2" do
|
||||
service 'apache2' do
|
||||
case node['platform_family']
|
||||
when "rhel", "fedora", "suse"
|
||||
service_name "httpd"
|
||||
when 'rhel', 'fedora', 'suse'
|
||||
service_name 'httpd'
|
||||
# If restarted/reloaded too quickly httpd has a habit of failing.
|
||||
# This may happen with multiple recipes notifying apache to restart - like
|
||||
# during the initial bootstrap.
|
||||
restart_command "/sbin/service httpd restart && sleep 1"
|
||||
reload_command "/sbin/service httpd reload && sleep 1"
|
||||
when "debian"
|
||||
service_name "apache2"
|
||||
restart_command "/usr/sbin/invoke-rc.d apache2 restart && sleep 1"
|
||||
reload_command "/usr/sbin/invoke-rc.d apache2 reload && sleep 1"
|
||||
when "arch"
|
||||
service_name "httpd"
|
||||
when "freebsd"
|
||||
service_name "apache22"
|
||||
restart_command '/sbin/service httpd restart && sleep 1'
|
||||
reload_command '/sbin/service httpd reload && sleep 1'
|
||||
when 'debian'
|
||||
service_name 'apache2'
|
||||
restart_command '/usr/sbin/invoke-rc.d apache2 restart && sleep 1'
|
||||
reload_command '/usr/sbin/invoke-rc.d apache2 reload && sleep 1'
|
||||
when 'arch'
|
||||
service_name 'httpd'
|
||||
when 'freebsd'
|
||||
service_name 'apache22'
|
||||
end
|
||||
supports [:restart, :reload, :status]
|
||||
action :enable
|
||||
end
|
||||
|
||||
if platform_family?("rhel", "fedora", "arch", "suse", "freebsd")
|
||||
if platform_family?('rhel', 'fedora', 'arch', 'suse', 'freebsd')
|
||||
directory node['apache']['log_dir'] do
|
||||
mode 00755
|
||||
mode '0755'
|
||||
end
|
||||
|
||||
package "perl"
|
||||
package node['apache']['perl_pkg']
|
||||
|
||||
cookbook_file "/usr/local/bin/apache2_module_conf_generate.pl" do
|
||||
source "apache2_module_conf_generate.pl"
|
||||
mode 00755
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
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
|
||||
|
||||
%w{sites-available sites-enabled mods-available mods-enabled}.each do |dir|
|
||||
%w[sites-available sites-enabled mods-available mods-enabled].each do |dir|
|
||||
directory "#{node['apache']['dir']}/#{dir}" do
|
||||
mode 00755
|
||||
owner "root"
|
||||
mode '0755'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
end
|
||||
|
||||
execute "generate-module-list" do
|
||||
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
|
||||
action :nothing
|
||||
end
|
||||
|
||||
%w{a2ensite a2dissite a2enmod a2dismod}.each do |modscript|
|
||||
%w[a2ensite a2dissite a2enmod a2dismod].each do |modscript|
|
||||
template "/usr/sbin/#{modscript}" do
|
||||
source "#{modscript}.erb"
|
||||
mode 00700
|
||||
owner "root"
|
||||
mode '0700'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
end
|
||||
|
||||
# installed by default on centos/rhel, remove in favour of mods-enabled
|
||||
%w{ proxy_ajp auth_pam authz_ldap webalizer ssl welcome }.each do |f|
|
||||
%w[proxy_ajp auth_pam authz_ldap webalizer ssl welcome].each do |f|
|
||||
file "#{node['apache']['dir']}/conf.d/#{f}.conf" do
|
||||
action :delete
|
||||
backup false
|
||||
@ -94,11 +94,10 @@ if platform_family?("rhel", "fedora", "arch", "suse", "freebsd")
|
||||
end
|
||||
|
||||
# enable mod_deflate for consistency across distributions
|
||||
include_recipe "apache2::mod_deflate"
|
||||
include_recipe 'apache2::mod_deflate'
|
||||
end
|
||||
|
||||
if platform_family?("freebsd")
|
||||
|
||||
if platform_family?('freebsd')
|
||||
file "#{node['apache']['dir']}/Includes/no-accf.conf" do
|
||||
action :delete
|
||||
backup false
|
||||
@ -108,105 +107,95 @@ if platform_family?("freebsd")
|
||||
action :delete
|
||||
end
|
||||
|
||||
%w{
|
||||
%w[
|
||||
httpd-autoindex.conf httpd-dav.conf httpd-default.conf httpd-info.conf
|
||||
httpd-languages.conf httpd-manual.conf httpd-mpm.conf
|
||||
httpd-multilang-errordoc.conf httpd-ssl.conf httpd-userdir.conf
|
||||
httpd-vhosts.conf
|
||||
}.each do |f|
|
||||
|
||||
].each do |f|
|
||||
file "#{node['apache']['dir']}/extra/#{f}" do
|
||||
action :delete
|
||||
backup false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
directory "#{node['apache']['dir']}/extra" do
|
||||
action :delete
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
directory "#{node['apache']['dir']}/ssl" do
|
||||
mode 00755
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
|
||||
directory "#{node['apache']['dir']}/conf.d" do
|
||||
mode 00755
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
|
||||
directory node['apache']['cache_dir'] do
|
||||
mode 00755
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
%W[
|
||||
#{node['apache']['dir']}/ssl
|
||||
#{node['apache']['dir']}/conf.d
|
||||
#{node['apache']['cache_dir']}
|
||||
].each do |path|
|
||||
directory path do
|
||||
mode '0755'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
end
|
||||
end
|
||||
|
||||
# Set the preferred execution binary - prefork or worker
|
||||
template "/etc/sysconfig/httpd" do
|
||||
source "etc-sysconfig-httpd.erb"
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
mode 00644
|
||||
notifies :restart, "service[apache2]"
|
||||
only_if { platform_family?("rhel", "fedora") }
|
||||
template '/etc/sysconfig/httpd' do
|
||||
source 'etc-sysconfig-httpd.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
notifies :restart, 'service[apache2]'
|
||||
only_if { platform_family?('rhel', 'fedora') }
|
||||
end
|
||||
|
||||
template "apache2.conf" do
|
||||
template 'apache2.conf' do
|
||||
case node['platform_family']
|
||||
when "rhel", "fedora", "arch"
|
||||
when 'rhel', 'fedora', 'arch'
|
||||
path "#{node['apache']['dir']}/conf/httpd.conf"
|
||||
when "debian"
|
||||
when 'debian'
|
||||
path "#{node['apache']['dir']}/apache2.conf"
|
||||
when "freebsd"
|
||||
when 'freebsd'
|
||||
path "#{node['apache']['dir']}/httpd.conf"
|
||||
end
|
||||
source "apache2.conf.erb"
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
mode 00644
|
||||
notifies :restart, "service[apache2]"
|
||||
source 'apache2.conf.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
||||
|
||||
template "apache2-conf-security" do
|
||||
path "#{node['apache']['dir']}/conf.d/security"
|
||||
source "security.erb"
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
mode 00644
|
||||
backup false
|
||||
notifies :restart, "service[apache2]"
|
||||
template 'apache2-conf-security' do
|
||||
path "#{node['apache']['dir']}/conf.d/security.conf"
|
||||
source 'security.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
backup false
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
||||
|
||||
template "apache2-conf-charset" do
|
||||
path "#{node['apache']['dir']}/conf.d/charset"
|
||||
source "charset.erb"
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
mode 00644
|
||||
backup false
|
||||
notifies :restart, "service[apache2]"
|
||||
template 'apache2-conf-charset' do
|
||||
path "#{node['apache']['dir']}/conf.d/charset.conf"
|
||||
source 'charset.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
backup false
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
||||
|
||||
template "#{node['apache']['dir']}/ports.conf" do
|
||||
source "ports.conf.erb"
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
variables :apache_listen_ports => node['apache']['listen_ports'].map { |p| p.to_i }.uniq
|
||||
mode 00644
|
||||
notifies :restart, "service[apache2]"
|
||||
source 'ports.conf.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
||||
|
||||
template "#{node['apache']['dir']}/sites-available/default" do
|
||||
source "default-site.erb"
|
||||
owner "root"
|
||||
group node['apache']['root_group']
|
||||
mode 00644
|
||||
notifies :restart, "service[apache2]"
|
||||
source 'default-site.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
||||
|
||||
node['apache']['default_modules'].each do |mod|
|
||||
@ -214,10 +203,10 @@ node['apache']['default_modules'].each do |mod|
|
||||
include_recipe "apache2::#{module_recipe_name}"
|
||||
end
|
||||
|
||||
apache_site "default" do
|
||||
apache_site 'default' do
|
||||
enable node['apache']['default_site_enabled']
|
||||
end
|
||||
|
||||
service "apache2" do
|
||||
service 'apache2' do
|
||||
action :start
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: god_monitor
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,17 +17,17 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_service = service "apache2" do
|
||||
apache_service = service 'apache2' do
|
||||
action :nothing
|
||||
end
|
||||
|
||||
start_command = apache_service.start_command
|
||||
stop_command = apache_service.stop_command
|
||||
start_command = apache_service.start_command
|
||||
stop_command = apache_service.stop_command
|
||||
restart_command = apache_service.restart_command
|
||||
|
||||
god_monitor "apache2" do
|
||||
config "apache2.god.erb"
|
||||
start (start_command)?start_command : "/etc/init.d/#{apache_service.service_name} start"
|
||||
restart (restart_command)?restart_command : "/etc/init.d/#{apache_service.service_name} restart"
|
||||
stop (stop_command)?stop_command : "/etc/init.d/#{apache_service.service_name} stop"
|
||||
god_monitor 'apache2' do
|
||||
config 'apache2.god.erb'
|
||||
start start_command || "/etc/init.d/#{apache_service.service_name} start"
|
||||
restart restart_command || "/etc/init.d/#{apache_service.service_name} restart"
|
||||
stop stop_command || "/etc/init.d/#{apache_service.service_name} stop"
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: iptables
|
||||
#
|
||||
# Copyright 2012, Opscode, Inc.
|
||||
# Copyright 2012-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
iptables_rule "port_apache"
|
||||
iptables_rule 'port_apache'
|
||||
|
@ -17,14 +17,14 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_service = service "apache2" do
|
||||
apache_service = service 'apache2' do
|
||||
action :nothing
|
||||
end
|
||||
|
||||
begin
|
||||
include_recipe 'logrotate'
|
||||
rescue
|
||||
Chef::Log.warn("The apache::logrotate recipe requires the logrotate cookbook. Install the cookbook with `knife cookbook site install logrotate`.")
|
||||
Chef::Log.warn('The apache::logrotate recipe requires the logrotate cookbook. Install the cookbook with `knife cookbook site install logrotate`.')
|
||||
end
|
||||
logrotate_app apache_service.service_name do
|
||||
path node['apache']['log_dir']
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: actions
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "actions"
|
||||
apache_module 'actions'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: alias
|
||||
# Recipe:: alias
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "alias" do
|
||||
apache_module 'alias' do
|
||||
conf true
|
||||
end
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# modified from the python recipe by Jeremy Bingham
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,30 +19,27 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "apache2"
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
case node['platform_family']
|
||||
when "debian"
|
||||
|
||||
package "libapache2-mod-apreq2"
|
||||
|
||||
when "rhel", "fedora"
|
||||
|
||||
package "libapreq2" do
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
when 'debian'
|
||||
package 'libapache2-mod-apreq2'
|
||||
when 'rhel', 'fedora'
|
||||
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
|
||||
# loaded as 'apreq', but on RHEL & derivitatives the file needs a symbolic
|
||||
# link to mod_apreq.so.
|
||||
link "/usr/lib64/httpd/modules/mod_apreq.so" do
|
||||
to "/usr/lib64/httpd/modules/mod_apreq2.so"
|
||||
only_if "test -f /usr/lib64/httpd/modules/mod_apreq2.so"
|
||||
link '/usr/lib64/httpd/modules/mod_apreq.so' do
|
||||
to '/usr/lib64/httpd/modules/mod_apreq2.so'
|
||||
only_if 'test -f /usr/lib64/httpd/modules/mod_apreq2.so'
|
||||
end
|
||||
|
||||
link "/usr/lib/httpd/modules/mod_apreq.so" do
|
||||
to "/usr/lib/httpd/modules/mod_apreq2.so"
|
||||
only_if "test -f /usr/lib/httpd/modules/mod_apreq2.so"
|
||||
link '/usr/lib/httpd/modules/mod_apreq.so' do
|
||||
to '/usr/lib/httpd/modules/mod_apreq2.so'
|
||||
only_if 'test -f /usr/lib/httpd/modules/mod_apreq2.so'
|
||||
end
|
||||
end
|
||||
|
||||
@ -51,4 +48,4 @@ file "#{node['apache']['dir']}/conf.d/apreq.conf" do
|
||||
backup false
|
||||
end
|
||||
|
||||
apache_module "apreq"
|
||||
apache_module 'apreq'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: auth_basic
|
||||
# Recipe:: auth_basic
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "auth_basic"
|
||||
apache_module 'auth_basic'
|
||||
|
@ -1,50 +1,64 @@
|
||||
include_recipe "apache2"
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: auth_basic
|
||||
#
|
||||
# Copyright 2013, Opscode, 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 "httpd-devel" do
|
||||
package 'httpd-devel' do
|
||||
package_name value_for_platform_family(
|
||||
["rhel", "fedora", "suse"] => "httpd-devel",
|
||||
"debian" => "apache2-dev"
|
||||
%w[rhel fedora suse] => 'httpd-devel',
|
||||
'debian' => 'apache2-dev'
|
||||
)
|
||||
end
|
||||
|
||||
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
|
||||
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']['libexecdir']}/mod_auth_cas.so"
|
||||
cwd '/tmp/mod_auth_cas'
|
||||
not_if "test -f #{node['apache']['libexecdir']}/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 00644
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
else
|
||||
case node['platform_family']
|
||||
when "debian"
|
||||
when 'debian'
|
||||
package 'libapache2-mod-auth-cas'
|
||||
|
||||
package "libapache2-mod-auth-cas"
|
||||
|
||||
when "rhel", "fedora"
|
||||
|
||||
yum_package "mod_auth_cas" do
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
when 'rhel', 'fedora'
|
||||
yum_package 'mod_auth_cas' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/auth_cas.conf" do
|
||||
action :delete
|
||||
backup false
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@ -55,5 +69,5 @@ end
|
||||
directory "#{node['apache']['cache_dir']}/mod_auth_cas" do
|
||||
owner node['apache']['user']
|
||||
group node['apache']['group']
|
||||
mode 00700
|
||||
mode '0700'
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: auth_digest
|
||||
# Recipe:: auth_digest
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "auth_digest"
|
||||
apache_module 'auth_digest'
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: mod_auth_openid
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -18,46 +18,44 @@
|
||||
#
|
||||
|
||||
openid_dev_pkgs = value_for_platform_family(
|
||||
["debian"] => %w{automake make g++ apache2-prefork-dev libopkele-dev libopkele3 libtool},
|
||||
["rhel", "fedora"] => %w{gcc-c++ httpd-devel curl-devel libtidy libtidy-devel sqlite-devel pcre-devel openssl-devel make libtool},
|
||||
"arch" => ["libopkele"],
|
||||
"freebsd" => %w{libopkele pcre sqlite3}
|
||||
'debian' => %w[automake make g++ apache2-prefork-dev libopkele-dev libopkele3 libtool],
|
||||
%w[rhel fedora] => %w[gcc-c++ httpd-devel 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"
|
||||
'freebsd' => { 'default' => 'gmake' },
|
||||
'default' => 'make'
|
||||
)
|
||||
|
||||
case node['platform_family']
|
||||
when "arch"
|
||||
when 'arch'
|
||||
include_recipe 'pacman::default'
|
||||
|
||||
package 'tidyhtml'
|
||||
|
||||
include_recipe "pacman"
|
||||
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"
|
||||
when 'rhel', 'fedora'
|
||||
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 00644
|
||||
checksum "57a5bc753b7e80c5ece1e5968b2051b0ce7ed9ce4329d17122c61575a9ea7648"
|
||||
source 'http://kin.klever.net/dist/libopkele-2.0.4.tar.gz'
|
||||
mode '0644'
|
||||
checksum '57a5bc753b7e80c5ece1e5968b2051b0ce7ed9ce4329d17122c61575a9ea7648'
|
||||
end
|
||||
|
||||
bash "install libopkele" do
|
||||
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("/")]
|
||||
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}
|
||||
@ -72,54 +70,54 @@ 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 00644
|
||||
mode '0644'
|
||||
action :create_if_missing
|
||||
end
|
||||
|
||||
file "mod_auth_openid_dblocation" do
|
||||
path node['apache']['mod_auth_openid']['dblocation']
|
||||
action :nothing
|
||||
end
|
||||
|
||||
bash "untar mod_auth_openid" do
|
||||
cwd Chef::Config['file_cache_path']
|
||||
code <<-EOH
|
||||
tar zxvf mod_auth_openid-#{version}.tar.gz
|
||||
EOH
|
||||
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} && #{make_cmd} install
|
||||
EOH
|
||||
creates "#{node['apache']['libexecdir']}/mod_auth_openid.so"
|
||||
notifies :delete, "file[mod_auth_openid_dblocation]", :immediately
|
||||
notifies :restart, "service[apache2]"
|
||||
end
|
||||
|
||||
directory node['apache']['mod_auth_openid']['cache_dir'] do
|
||||
owner node['apache']['user']
|
||||
group node['apache']['group']
|
||||
mode 00700
|
||||
mode '0700'
|
||||
end
|
||||
|
||||
file node['apache']['mod_auth_openid']['dblocation'] do
|
||||
owner node['apache']['user']
|
||||
group node['apache']['group']
|
||||
mode 00644
|
||||
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']['libexecdir']}/mod_auth_openid.so"
|
||||
notifies :restart, 'service[apache2]'
|
||||
not_if "test -f #{node['apache']['libexecdir']}/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 00644
|
||||
source 'mods/authopenid.load.erb'
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
apache_module "authopenid" do
|
||||
filename "mod_auth_openid.so"
|
||||
apache_module 'authopenid' do
|
||||
filename 'mod_auth_openid.so'
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: authn_file
|
||||
# Recipe:: authn_file
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "authn_file"
|
||||
apache_module 'authn_file'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: authnz_ldap
|
||||
# Recipe:: authnz_ldap
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "authnz_ldap"
|
||||
apache_module 'authnz_ldap'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: authz_default
|
||||
# Recipe:: authz_default
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,9 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
unless %w{debian}.include?(node['platform_family']) && node['platform_version'].to_f >= 14 then
|
||||
print "load authz_default module"
|
||||
apache_module "authz_default"
|
||||
else
|
||||
print "do not load authz_default module"
|
||||
end
|
||||
apache_module 'authz_default'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: authz_groupfile
|
||||
# Recipe:: authz_groupfile
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "authz_groupfile"
|
||||
apache_module 'authz_groupfile'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: authz_host
|
||||
# Recipe:: authz_host
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "authz_host"
|
||||
apache_module 'authz_host'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: authz_user
|
||||
# Recipe:: authz_user
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "authz_user"
|
||||
apache_module 'authz_user'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: autoindex
|
||||
# Recipe:: autoindex
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "autoindex" do
|
||||
apache_module 'autoindex' do
|
||||
conf true
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: cgi
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "cgi"
|
||||
apache_module 'cgi'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2_test
|
||||
# Recipe:: mod_cgi
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: cloudflare
|
||||
#
|
||||
# Copyright 2012, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,19 +17,14 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "apache2::default"
|
||||
include_recipe "apache2::mod_cgi"
|
||||
|
||||
directory node['apache_test']['cgi_dir'] do
|
||||
action :create
|
||||
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
|
||||
|
||||
file "#{node['apache_test']['cgi_dir']}/env" do
|
||||
content %q{
|
||||
#!/bin/bash
|
||||
echo -e "Content-type: text/plain\n"
|
||||
/usr/bin/env
|
||||
}.strip
|
||||
mode "0755"
|
||||
action :create
|
||||
package 'libapache2-mod-cloudflare' do
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: dav
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "dav"
|
||||
apache_module 'dav'
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: dav_fs
|
||||
#
|
||||
# Copyright 2011, Atriso
|
||||
# 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.
|
||||
@ -17,5 +17,5 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "apache2::mod_dav"
|
||||
apache_module "dav_fs"
|
||||
include_recipe 'apache2::mod_dav'
|
||||
apache_module 'dav_fs'
|
||||
|
@ -17,25 +17,23 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "apache2::mod_dav"
|
||||
include_recipe 'apache2::mod_dav'
|
||||
|
||||
package "libapache2-svn" do
|
||||
package 'libapache2-svn' do
|
||||
case node['platform_family']
|
||||
when "rhel", "fedora", "suse"
|
||||
package_name "mod_dav_svn"
|
||||
when 'rhel', 'fedora', 'suse'
|
||||
package_name 'mod_dav_svn'
|
||||
else
|
||||
package_name "libapache2-svn"
|
||||
package_name 'libapache2-svn'
|
||||
end
|
||||
end
|
||||
|
||||
case node['platform_family']
|
||||
when "rhel", "fedora", "suse"
|
||||
|
||||
file "#{node['apache']['conf']}/conf.d/subversion.conf" do
|
||||
when 'rhel', 'fedora', 'suse'
|
||||
file "#{node['apache']['dir']}/conf.d/subversion.conf" do
|
||||
action :delete
|
||||
backup false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
apache_module "dav_svn"
|
||||
apache_module 'dav_svn'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: deflate
|
||||
# Recipe:: deflate
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "deflate" do
|
||||
apache_module 'deflate' do
|
||||
conf true
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: dir
|
||||
# Recipe:: dir
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "dir" do
|
||||
apache_module 'dir' do
|
||||
conf true
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: env
|
||||
# Recipe:: env
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "env"
|
||||
apache_module 'env'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: expires
|
||||
# Recipe:: expires
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "expires"
|
||||
apache_module 'expires'
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: fastcgi
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,10 +17,36 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?("debian")
|
||||
package "libapache2-mod-fastcgi"
|
||||
if platform_family?('debian')
|
||||
package 'libapache2-mod-fastcgi'
|
||||
elsif platform_family?('rhel')
|
||||
%w[gcc make libtool httpd-devel apr-devel apr].each do |package|
|
||||
yum_package package do
|
||||
action :upgrade
|
||||
end
|
||||
end
|
||||
|
||||
apache_module "fastcgi" do
|
||||
conf true
|
||||
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 = node['apache']['lib_dir']
|
||||
bash 'compile fastcgi source' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
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
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: fcgid
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,12 +17,11 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?("debian")
|
||||
package "libapache2-mod-fcgid"
|
||||
elsif platform_family?("rhel", "fedora")
|
||||
|
||||
package "mod_fcgid" do
|
||||
notifies :run, resources(:execute => "generate-module-list"), :immediately
|
||||
if platform_family?('debian')
|
||||
package 'libapache2-mod-fcgid'
|
||||
elsif platform_family?('rhel', 'fedora')
|
||||
package 'mod_fcgid' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/fcgid.conf" do
|
||||
@ -30,17 +29,16 @@ elsif platform_family?("rhel", "fedora")
|
||||
backup false
|
||||
end
|
||||
|
||||
directory "/var/run/httpd/mod_fcgid" do
|
||||
directory '/var/run/httpd/mod_fcgid' do
|
||||
recursive true
|
||||
only_if { node['platform_version'].to_i >= 6 }
|
||||
end
|
||||
|
||||
elsif platform_family?("suse")
|
||||
elsif platform_family?('suse')
|
||||
apache_lib_path = node['apache']['lib_dir']
|
||||
|
||||
package "httpd-devel"
|
||||
package 'httpd-devel'
|
||||
|
||||
bash "install-fcgid" do
|
||||
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)
|
||||
@ -50,6 +48,6 @@ EOH
|
||||
end
|
||||
end
|
||||
|
||||
apache_module "fcgid" do
|
||||
apache_module 'fcgid' do
|
||||
conf true
|
||||
end
|
||||
|
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "filter"
|
||||
apache_module 'filter'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: headers
|
||||
# Recipe:: headers
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "headers"
|
||||
apache_module 'headers'
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: include
|
||||
#
|
||||
# Copyright 2012, Opscode, Inc.
|
||||
# Copyright 2012-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "include" do
|
||||
apache_module 'include' do
|
||||
conf true
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Cookbook Name:: memcached_test
|
||||
# Recipe:: default
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: info
|
||||
#
|
||||
# Copyright 2013, Opscode, Inc.
|
||||
#
|
||||
@ -17,4 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "memcached::default"
|
||||
apache_module 'info' do
|
||||
conf true
|
||||
end
|
@ -1,7 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apt_test
|
||||
# Recipe:: cacher-client_test
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: jk
|
||||
#
|
||||
# Copyright 2013, Mike Babineau <michael.babineau@gmail.com>
|
||||
# Copyright 2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -17,13 +18,13 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
require File.expand_path('../support/helpers', __FILE__)
|
||||
|
||||
describe "apt_test::cacher-client" do
|
||||
include Helpers::AptTest
|
||||
|
||||
it 'does not create 01proxy' do
|
||||
file('/etc/apt/apt.conf.d/01proxy').wont_exist
|
||||
package 'libapache2-mod-jk' do
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora', 'suse'
|
||||
package_name 'mod_jk'
|
||||
else
|
||||
package_name 'libapache2-mod-jk'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
apache_module 'jk'
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: ldap
|
||||
# Recipe:: ldap
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "ldap"
|
||||
apache_module 'ldap'
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: log_config
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,8 +17,8 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?("rhel", "fedora", "suse", "arch", "freebsd")
|
||||
apache_module "log_config"
|
||||
if platform_family?('rhel', 'fedora', 'suse', 'arch', 'freebsd')
|
||||
apache_module 'log_config'
|
||||
else
|
||||
include_recipe "apache2"
|
||||
include_recipe 'apache2::default'
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: logio
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,8 +17,8 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if platform_family?("rhel", "fedora", "suse", "arch", "freebsd")
|
||||
apache_module "logio"
|
||||
if platform_family?('rhel', 'fedora', 'suse', 'arch', 'freebsd')
|
||||
apache_module 'logio'
|
||||
else
|
||||
include_recipe "apache2"
|
||||
include_recipe 'apache2::default'
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: mime
|
||||
# Recipe:: mime
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "mime" do
|
||||
apache_module 'mime' do
|
||||
conf true
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: negotiation
|
||||
# Recipe:: negotiation
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "negotiation" do
|
||||
apache_module 'negotiation' do
|
||||
conf true
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2_test
|
||||
# Recipe:: mod_ajp
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2012, Opscode, Inc.
|
||||
# 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.
|
||||
@ -17,28 +17,21 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "apache2::default"
|
||||
include_recipe "apache2::mod_proxy"
|
||||
include_recipe "apache2::mod_proxy_ajp"
|
||||
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
|
||||
|
||||
if platform_family?("rhel") && node['platform_version'].to_f < 6.0
|
||||
include_recipe "jpackage::default"
|
||||
end
|
||||
|
||||
include_recipe "tomcat::default"
|
||||
|
||||
if platform?("debian","ubuntu")
|
||||
package "tomcat6-examples" do
|
||||
package 'mod_pagespeed' do
|
||||
source "#{Chef::Config[:file_cache_path]}/mod-pagespeed.deb"
|
||||
action :install
|
||||
end
|
||||
|
||||
apache_module 'pagespeed' do
|
||||
conf true
|
||||
end
|
||||
else
|
||||
package "tomcat6-webapps" do
|
||||
action :install
|
||||
end
|
||||
end
|
||||
|
||||
web_app "java_env" do
|
||||
template "java_env.conf.erb"
|
||||
ajp_host 'localhost'
|
||||
ajp_port 8009
|
||||
Chef::Log.warm "apache::mod_pagespeed does not support #{node["platform_family"]} yet, and is not being installed"
|
||||
end
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# adapted from the mod_python recipe by Jeremy Bingham
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -20,20 +20,16 @@
|
||||
#
|
||||
|
||||
case node['platform_family']
|
||||
when "debian"
|
||||
%w{libapache2-mod-perl2 libapache2-request-perl apache2-mpm-prefork}.each do |pkg|
|
||||
|
||||
when 'debian'
|
||||
%w[libapache2-mod-perl2 libapache2-request-perl apache2-mpm-prefork].each do |pkg|
|
||||
package pkg
|
||||
|
||||
end
|
||||
when "rhel", "fedora"
|
||||
|
||||
package "mod_perl" do
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
when 'rhel', 'fedora'
|
||||
package 'mod_perl' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
package "perl-libapreq2"
|
||||
|
||||
package 'perl-libapreq2'
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/perl.conf" do
|
||||
@ -41,4 +37,4 @@ file "#{node['apache']['dir']}/conf.d/perl.conf" do
|
||||
backup false
|
||||
end
|
||||
|
||||
apache_module "perl"
|
||||
apache_module 'perl'
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: php5
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -18,50 +18,41 @@
|
||||
#
|
||||
|
||||
case node['platform_family']
|
||||
when "debian"
|
||||
|
||||
package "libapache2-mod-php5"
|
||||
|
||||
when "arch"
|
||||
|
||||
package "php-apache" do
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
when 'debian'
|
||||
package 'libapache2-mod-php5'
|
||||
when 'arch'
|
||||
package 'php-apache' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
when 'rhel'
|
||||
package 'which'
|
||||
|
||||
when "rhel"
|
||||
|
||||
package "which"
|
||||
package "php package" do
|
||||
package 'php package' do
|
||||
if node['platform_version'].to_f < 6.0
|
||||
package_name "php53"
|
||||
package_name 'php53'
|
||||
else
|
||||
package_name "php"
|
||||
package_name 'php'
|
||||
end
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
not_if "which php"
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
not_if 'which php'
|
||||
end
|
||||
|
||||
when "fedora"
|
||||
|
||||
package "php package" do
|
||||
package_name "php"
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
not_if "which php"
|
||||
when 'fedora'
|
||||
package 'php package' do
|
||||
package_name 'php'
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
not_if 'which php'
|
||||
end
|
||||
|
||||
when "freebsd"
|
||||
|
||||
freebsd_port_options "php5" do
|
||||
options "APACHE" => true
|
||||
when 'freebsd'
|
||||
freebsd_port_options 'php5' do
|
||||
options 'APACHE' => true
|
||||
action :create
|
||||
end
|
||||
|
||||
package "php package" do
|
||||
package_name "php5"
|
||||
source "ports"
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
package 'php package' do
|
||||
package_name 'php5'
|
||||
source 'ports'
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/php.conf" do
|
||||
@ -69,10 +60,10 @@ file "#{node['apache']['dir']}/conf.d/php.conf" do
|
||||
backup false
|
||||
end
|
||||
|
||||
apache_module "php5" do
|
||||
apache_module 'php5' do
|
||||
case node['platform_family']
|
||||
when "rhel", "fedora", "freebsd"
|
||||
when 'rhel', 'fedora', 'freebsd'
|
||||
conf true
|
||||
filename "libphp5.so"
|
||||
filename 'libphp5.so'
|
||||
end
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: proxy
|
||||
# Recipe:: proxy
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "proxy" do
|
||||
apache_module 'proxy' do
|
||||
conf true
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: proxy
|
||||
# Recipe:: proxy
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,5 +17,5 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "apache2::mod_proxy"
|
||||
apache_module "proxy_ajp"
|
||||
include_recipe 'apache2::mod_proxy'
|
||||
apache_module 'proxy_ajp'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: proxy
|
||||
# Recipe:: proxy
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "proxy_balancer"
|
||||
apache_module 'proxy_balancer'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: proxy
|
||||
# Recipe:: proxy
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "proxy_connect"
|
||||
apache_module 'proxy_connect'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: proxy_http
|
||||
# Recipe:: proxy_http
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "proxy_http"
|
||||
apache_module 'proxy_http'
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: python
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -18,14 +18,11 @@
|
||||
#
|
||||
|
||||
case node['platform_family']
|
||||
when "debian"
|
||||
|
||||
package "libapache2-mod-python"
|
||||
|
||||
when "rhel", "fedora"
|
||||
|
||||
package "mod_python" do
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
when 'debian'
|
||||
package 'libapache2-mod-python'
|
||||
when 'rhel', 'fedora'
|
||||
package 'mod_python' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
end
|
||||
|
||||
@ -34,4 +31,4 @@ file "#{node['apache']['dir']}/conf.d/python.conf" do
|
||||
backup false
|
||||
end
|
||||
|
||||
apache_module "python"
|
||||
apache_module 'python'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: rewrite
|
||||
# Recipe:: rewrite
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "rewrite"
|
||||
apache_module 'rewrite'
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: setenvif
|
||||
# Recipe:: setenvif
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "setenvif" do
|
||||
apache_module 'setenvif' do
|
||||
conf true
|
||||
end
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: ssl
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -16,16 +16,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
unless node['apache']['listen_ports'].include?("443")
|
||||
node.set['apache']['listen_ports'] = node['apache']['listen_ports'] + ["443"]
|
||||
unless node['apache']['listen_ports'].include?('443')
|
||||
node.set['apache']['listen_ports'] = node['apache']['listen_ports'] + ['443']
|
||||
end
|
||||
|
||||
ports = node['apache']['listen_ports']
|
||||
|
||||
if platform_family?("rhel", "fedora", "suse")
|
||||
|
||||
package "mod_ssl" do
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
if platform_family?('rhel', 'fedora', 'suse')
|
||||
package 'mod_ssl' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/ssl.conf" do
|
||||
@ -35,12 +32,11 @@ if platform_family?("rhel", "fedora", "suse")
|
||||
end
|
||||
|
||||
template "#{node['apache']['dir']}/ports.conf" do
|
||||
source "ports.conf.erb"
|
||||
variables :apache_listen_ports => ports.map { |p| p.to_i }.uniq
|
||||
notifies :restart, "service[apache2]"
|
||||
mode 00644
|
||||
source 'ports.conf.erb'
|
||||
mode '0644'
|
||||
notifies :restart, 'service[apache2]'
|
||||
end
|
||||
|
||||
apache_module "ssl" do
|
||||
apache_module 'ssl' do
|
||||
conf true
|
||||
end
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: status
|
||||
# Recipe:: status
|
||||
#
|
||||
# Copyright 2008-2009, Opscode, Inc.
|
||||
# Copyright 2008-2012, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,6 +17,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
apache_module "status" do
|
||||
apache_module 'status' do
|
||||
conf true
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Cookbook Name:: apt_test
|
||||
# Recipe:: cacher-client
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: mod_userdir
|
||||
#
|
||||
# Copyright 2013, Opscode, Inc.
|
||||
#
|
||||
@ -17,4 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "apt::cacher-client"
|
||||
apache_module 'userdir'
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: mod_wsgi
|
||||
#
|
||||
# Copyright 2008-2012, Opscode, Inc.
|
||||
# Copyright 2008-2013, Opscode, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -18,16 +18,12 @@
|
||||
#
|
||||
|
||||
case node['platform_family']
|
||||
when "debian"
|
||||
|
||||
package "libapache2-mod-wsgi"
|
||||
|
||||
when "rhel", "fedora", "arch"
|
||||
|
||||
package "mod_wsgi" do
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
when 'debian'
|
||||
package 'libapache2-mod-wsgi'
|
||||
when 'rhel', 'fedora', 'arch'
|
||||
package 'mod_wsgi' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/wsgi.conf" do
|
||||
@ -35,4 +31,4 @@ file "#{node['apache']['dir']}/conf.d/wsgi.conf" do
|
||||
backup false
|
||||
end
|
||||
|
||||
apache_module "wsgi"
|
||||
apache_module 'wsgi'
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Cookbook Name:: apache2
|
||||
# Recipe:: mod_xsendfile
|
||||
#
|
||||
# Copyright 2011, CustomInk, LLC.
|
||||
# Copyright 2011-2013, CustomInk, LLC.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -18,16 +18,12 @@
|
||||
#
|
||||
|
||||
case node['platform_family']
|
||||
when "debian"
|
||||
|
||||
package "libapache2-mod-xsendfile"
|
||||
|
||||
when "rhel", "fedora"
|
||||
|
||||
package "mod_xsendfile" do
|
||||
notifies :run, "execute[generate-module-list]", :immediately
|
||||
when 'debian'
|
||||
package 'libapache2-mod-xsendfile'
|
||||
when 'rhel', 'fedora'
|
||||
package 'mod_xsendfile' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/xsendfile.conf" do
|
||||
@ -35,4 +31,4 @@ file "#{node['apache']['dir']}/conf.d/xsendfile.conf" do
|
||||
backup false
|
||||
end
|
||||
|
||||
apache_module "xsendfile"
|
||||
apache_module 'xsendfile'
|
||||
|
@ -14,8 +14,8 @@ else
|
||||
fi
|
||||
|
||||
#figure out if we're on a prefork or threaded mpm
|
||||
if [ -x /usr/sbin/apache2 ]; then
|
||||
PREFORK=`/usr/sbin/apache2 -l | grep prefork || true`
|
||||
if [ -x <%= node['apache']['binary'] %> ]; then
|
||||
PREFORK=`<%= node['apache']['binary'] %> -l | grep prefork || true`
|
||||
fi
|
||||
|
||||
if [ -e $SYSCONFDIR/mods-enabled/$MODNAME.load -a -e $SYSCONFDIR/mods-enabled/$MODNAME.conf ]; then
|
||||
|
@ -8,13 +8,9 @@ ServerRoot "<%= node['apache']['dir'] %>"
|
||||
#
|
||||
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
|
||||
#
|
||||
<% if %w{debian}.include?(node['platform_family']) -%>
|
||||
<% if node['platform_version'].to_f >= 14 -%>
|
||||
Mutex file:/var/lock/apache2 default
|
||||
<% else %>
|
||||
<% if %w[debian].include?(node['platform_family']) -%>
|
||||
LockFile /var/lock/apache2/accept.lock
|
||||
<% end -%>
|
||||
<% elsif %w{freebsd}.include?(node['platform_family']) -%>
|
||||
<% elsif %w[freebsd].include?(node['platform_family']) -%>
|
||||
LockFile /var/log/accept.lock
|
||||
<% else %>
|
||||
LockFile logs/accept.lock
|
||||
@ -24,7 +20,6 @@ LockFile logs/accept.lock
|
||||
# PidFile: The file in which the server should record its process
|
||||
# identification number when it starts.
|
||||
#
|
||||
|
||||
PidFile <%= node['apache']['pid_file'] %>
|
||||
|
||||
#
|
||||
@ -53,7 +48,7 @@ KeepAliveTimeout <%= node['apache']['keepalivetimeout'] %>
|
||||
|
||||
##
|
||||
## Server-Pool Size Regulation (MPM specific)
|
||||
##
|
||||
##
|
||||
|
||||
# prefork MPM
|
||||
# StartServers: number of server processes to start
|
||||
@ -99,8 +94,8 @@ Group <%= node['apache']['group'] %>
|
||||
AccessFileName .htaccess
|
||||
|
||||
#
|
||||
# The following lines prevent .htaccess and .htpasswd files from being
|
||||
# viewed by Web clients.
|
||||
# The following lines prevent .htaccess and .htpasswd files from being
|
||||
# viewed by Web clients.
|
||||
#
|
||||
<Files ~ "^\.ht">
|
||||
Order allow,deny
|
||||
@ -151,7 +146,7 @@ LogLevel warn
|
||||
Include <%= node['apache']['dir'] %>/mods-enabled/*.load
|
||||
Include <%= node['apache']['dir'] %>/mods-enabled/*.conf
|
||||
|
||||
<% if %w{freebsd}.include?(node['platform_family']) -%>
|
||||
<% if %w[freebsd].include?(node['platform_family']) -%>
|
||||
<IfDefine NOHTTPACCEPT>
|
||||
AcceptFilter http none
|
||||
AcceptFilter https none
|
||||
@ -186,7 +181,7 @@ LogFormat "%{User-agent}i" agent
|
||||
# Putting this all together, we can internationalize error responses.
|
||||
#
|
||||
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
|
||||
# our collection of by-error message multi-language collections. We use
|
||||
# our collection of by-error message multi-language collections. We use
|
||||
# includes to substitute the appropriate text.
|
||||
#
|
||||
# You can modify the messages' appearance without changing any of the
|
||||
@ -195,7 +190,7 @@ LogFormat "%{User-agent}i" agent
|
||||
# Alias /error/include/ "/your/include/path/"
|
||||
#
|
||||
# which allows you to create your own set of files by starting with the
|
||||
# /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
|
||||
# /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
|
||||
# even on a per-VirtualHost basis. The default include files will display
|
||||
# your Apache version number and your ServerAdmin email address regardless
|
||||
# of the setting of ServerSignature.
|
||||
@ -237,7 +232,7 @@ LogFormat "%{User-agent}i" agent
|
||||
|
||||
|
||||
# Include generic snippets of statements
|
||||
Include <%= node['apache']['dir'] %>/conf.d/
|
||||
Include <%= node['apache']['dir'] %>/conf.d/*.conf
|
||||
|
||||
# Include the virtual host configurations:
|
||||
Include <%= node['apache']['dir'] %>/sites-enabled/
|
||||
|
@ -1,57 +1,55 @@
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin <%= node['apache']['contact'] %>
|
||||
ServerAdmin <%= node['apache']['contact'] %>
|
||||
|
||||
DocumentRoot <%= node['apache']['docroot_dir'] %>/
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
<Directory <%= node['apache']['docroot_dir'] %>/>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
allow from all
|
||||
# This directive allows us to have apache2's default start page
|
||||
# in /apache2-default/, but still have / go to the right place
|
||||
#RedirectMatch ^/$ /apache2-default/
|
||||
</Directory>
|
||||
DocumentRoot <%= node['apache']['docroot_dir'] %>/
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin/ <%= node['apache']['cgibin_dir'] %>/
|
||||
<Directory "<%= node['apache']['cgibin_dir'] %>">
|
||||
AllowOverride None
|
||||
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
<Directory <%= node['apache']['docroot_dir'] %>/>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
ErrorLog <%= node['apache']['log_dir'] %>/<%= node['apache']['error_log'] %>
|
||||
ScriptAlias /cgi-bin/ <%= node['apache']['cgibin_dir'] %>/
|
||||
<Directory "<%= node['apache']['cgibin_dir'] %>">
|
||||
AllowOverride None
|
||||
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
# Possible values include: debug, info, notice, warn, error, crit,
|
||||
# alert, emerg.
|
||||
LogLevel warn
|
||||
ErrorLog <%= node['apache']['log_dir'] %>/<%= node['apache']['error_log'] %>
|
||||
|
||||
CustomLog <%= node['apache']['log_dir'] %>/<%= node['apache']['access_log'] %> combined
|
||||
ServerSignature On
|
||||
# Possible values include: debug, info, notice, warn, error, crit,
|
||||
# alert, emerg.
|
||||
LogLevel warn
|
||||
|
||||
Alias /doc/ "/usr/share/doc/"
|
||||
<Directory "/usr/share/doc/">
|
||||
Options Indexes MultiViews FollowSymLinks
|
||||
AllowOverride None
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from 127.0.0.0/255.0.0.0 ::1/128
|
||||
</Directory>
|
||||
CustomLog <%= node['apache']['log_dir'] %>/<%= node['apache']['access_log'] %> combined
|
||||
ServerSignature On
|
||||
|
||||
<% if %w{ rhel fedora }.include?(node['platform_family']) -%>
|
||||
#
|
||||
# This configuration file enables the default "Welcome"
|
||||
# page if there is no default index page present for
|
||||
# the root URL. To disable the Welcome page, comment
|
||||
# out all the lines below.
|
||||
#
|
||||
<LocationMatch "^/+$">
|
||||
Options -Indexes
|
||||
ErrorDocument 403 /error/noindex.html
|
||||
</LocationMatch>
|
||||
<% end -%>
|
||||
Alias /doc/ "/usr/share/doc/"
|
||||
<Directory "/usr/share/doc/">
|
||||
Options Indexes MultiViews FollowSymLinks
|
||||
AllowOverride None
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from 127.0.0.0/255.0.0.0 ::1/128
|
||||
</Directory>
|
||||
|
||||
<% if %w[rhel fedora].include?(node['platform_family']) -%>
|
||||
#
|
||||
# This configuration file enables the default "Welcome"
|
||||
# page if there is no default index page present for
|
||||
# the root URL. To disable the Welcome page, comment
|
||||
# out all the lines below.
|
||||
#
|
||||
<LocationMatch "^/+$">
|
||||
Options -Indexes
|
||||
ErrorDocument 403 /error/noindex.html
|
||||
</LocationMatch>
|
||||
<% end -%>
|
||||
</VirtualHost>
|
||||
|
@ -28,4 +28,8 @@ HTTPD=<%= node['apache']['binary'] %>
|
||||
# specified in httpd.conf (via the PidFile directive), the new
|
||||
# location needs to be reported in the PIDFILE.
|
||||
#
|
||||
#PIDFILE=<%= node['apache']['pid_file'] %>
|
||||
PIDFILE=<%= node['apache']['pid_file'] %>
|
||||
|
||||
<% node['apache']['sysconfig_additional_params'].each do |k,v| %>
|
||||
<%= "#{k}=#{v}" %>
|
||||
<% end %>
|
||||
|
@ -1,24 +1,23 @@
|
||||
<IfModule alias_module>
|
||||
#
|
||||
# Aliases: Add here as many aliases as you need (with no limit). The format is
|
||||
# Alias fakename realname
|
||||
#
|
||||
# Note that if you include a trailing / on fakename then the server will
|
||||
# require it to be present in the URL. So "/icons" isn't aliased in this
|
||||
# example, only "/icons/". If the fakename is slash-terminated, then the
|
||||
# realname must also be slash terminated, and if the fakename omits the
|
||||
# trailing slash, the realname must also omit it.
|
||||
#
|
||||
# We include the /icons/ alias for FancyIndexed directory listings. If
|
||||
# you do not use FancyIndexing, you may comment this out.
|
||||
#
|
||||
Alias /icons/ "<%= node['apache']['icondir'] %>/"
|
||||
#
|
||||
# Aliases: Add here as many aliases as you need (with no limit). The format is
|
||||
# Alias fakename realname
|
||||
#
|
||||
# Note that if you include a trailing / on fakename then the server will
|
||||
# require it to be present in the URL. So "/icons" isn't aliased in this
|
||||
# example, only "/icons/". If the fakename is slash-terminated, then the
|
||||
# realname must also be slash terminated, and if the fakename omits the
|
||||
# trailing slash, the realname must also omit it.
|
||||
#
|
||||
# We include the /icons/ alias for FancyIndexed directory listings. If
|
||||
# you do not use FancyIndexing, you may comment this out.
|
||||
#
|
||||
Alias /icons/ "<%= node['apache']['icondir'] %>/"
|
||||
|
||||
<Directory "<%= node['apache']['icondir'] %>">
|
||||
<Directory "<%= node['apache']['icondir'] %>">
|
||||
Options Indexes MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
</Directory>
|
||||
</IfModule>
|
||||
|
@ -1 +1 @@
|
||||
CASCookiePath <%= node['apache']['cache_dir'] %>/mod_auth_cas/
|
||||
CASCookiePath <%= node['apache']['cache_dir'] %>/mod_auth_cas/
|
||||
|
@ -1,101 +1,100 @@
|
||||
<IfModule mod_autoindex.c>
|
||||
#
|
||||
# Directives controlling the display of server-generated directory listings.
|
||||
#
|
||||
#
|
||||
# Directives controlling the display of server-generated directory listings.
|
||||
#
|
||||
|
||||
#
|
||||
# IndexOptions: Controls the appearance of server-generated directory
|
||||
# listings.
|
||||
# Remove/replace the "Charset=UTF-8" if you don't use UTF-8 for your filenames.
|
||||
#
|
||||
IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* DescriptionWidth=* Charset=UTF-8
|
||||
#
|
||||
# IndexOptions: Controls the appearance of server-generated directory
|
||||
# listings.
|
||||
# Remove/replace the "Charset=UTF-8" if you don't use UTF-8 for your filenames.
|
||||
#
|
||||
IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* DescriptionWidth=* Charset=UTF-8
|
||||
|
||||
#
|
||||
# AddIcon* directives tell the server which icon to show for different
|
||||
# files or filename extensions. These are only displayed for
|
||||
# FancyIndexed directories.
|
||||
#
|
||||
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip x-bzip2
|
||||
#
|
||||
# AddIcon* directives tell the server which icon to show for different
|
||||
# files or filename extensions. These are only displayed for
|
||||
# FancyIndexed directories.
|
||||
#
|
||||
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip x-bzip2
|
||||
|
||||
AddIconByType (TXT,/icons/text.gif) text/*
|
||||
AddIconByType (IMG,/icons/image2.gif) image/*
|
||||
AddIconByType (SND,/icons/sound2.gif) audio/*
|
||||
AddIconByType (VID,/icons/movie.gif) video/*
|
||||
AddIconByType (TXT,/icons/text.gif) text/*
|
||||
AddIconByType (IMG,/icons/image2.gif) image/*
|
||||
AddIconByType (SND,/icons/sound2.gif) audio/*
|
||||
AddIconByType (VID,/icons/movie.gif) video/*
|
||||
|
||||
AddIcon /icons/binary.gif .bin .exe
|
||||
AddIcon /icons/binhex.gif .hqx
|
||||
AddIcon /icons/tar.gif .tar
|
||||
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
|
||||
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
|
||||
AddIcon /icons/a.gif .ps .ai .eps
|
||||
AddIcon /icons/layout.gif .html .shtml .htm .pdf
|
||||
AddIcon /icons/text.gif .txt
|
||||
AddIcon /icons/c.gif .c
|
||||
AddIcon /icons/p.gif .pl .py
|
||||
AddIcon /icons/f.gif .for
|
||||
AddIcon /icons/dvi.gif .dvi
|
||||
AddIcon /icons/uuencoded.gif .uu
|
||||
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
|
||||
AddIcon /icons/tex.gif .tex
|
||||
# It's a suffix rule, so simply matching "core" matches "score" as well !
|
||||
AddIcon /icons/bomb.gif /core
|
||||
AddIcon (SND,/icons/sound2.gif) .ogg
|
||||
AddIcon (VID,/icons/movie.gif) .ogm
|
||||
AddIcon /icons/binary.gif .bin .exe
|
||||
AddIcon /icons/binhex.gif .hqx
|
||||
AddIcon /icons/tar.gif .tar
|
||||
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
|
||||
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
|
||||
AddIcon /icons/a.gif .ps .ai .eps
|
||||
AddIcon /icons/layout.gif .html .shtml .htm .pdf
|
||||
AddIcon /icons/text.gif .txt
|
||||
AddIcon /icons/c.gif .c
|
||||
AddIcon /icons/p.gif .pl .py
|
||||
AddIcon /icons/f.gif .for
|
||||
AddIcon /icons/dvi.gif .dvi
|
||||
AddIcon /icons/uuencoded.gif .uu
|
||||
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
|
||||
AddIcon /icons/tex.gif .tex
|
||||
# It's a suffix rule, so simply matching "core" matches "score" as well !
|
||||
AddIcon /icons/bomb.gif /core
|
||||
AddIcon (SND,/icons/sound2.gif) .ogg
|
||||
AddIcon (VID,/icons/movie.gif) .ogm
|
||||
|
||||
AddIcon /icons/back.gif ..
|
||||
AddIcon /icons/hand.right.gif README
|
||||
AddIcon /icons/folder.gif ^^DIRECTORY^^
|
||||
AddIcon /icons/blank.gif ^^BLANKICON^^
|
||||
AddIcon /icons/back.gif ..
|
||||
AddIcon /icons/hand.right.gif README
|
||||
AddIcon /icons/folder.gif ^^DIRECTORY^^
|
||||
AddIcon /icons/blank.gif ^^BLANKICON^^
|
||||
|
||||
# Default icons for OpenDocument format
|
||||
AddIcon /icons/odf6odt-20x22.png .odt
|
||||
AddIcon /icons/odf6ods-20x22.png .ods
|
||||
AddIcon /icons/odf6odp-20x22.png .odp
|
||||
AddIcon /icons/odf6odg-20x22.png .odg
|
||||
AddIcon /icons/odf6odc-20x22.png .odc
|
||||
AddIcon /icons/odf6odf-20x22.png .odf
|
||||
AddIcon /icons/odf6odb-20x22.png .odb
|
||||
AddIcon /icons/odf6odi-20x22.png .odi
|
||||
AddIcon /icons/odf6odm-20x22.png .odm
|
||||
# Default icons for OpenDocument format
|
||||
AddIcon /icons/odf6odt-20x22.png .odt
|
||||
AddIcon /icons/odf6ods-20x22.png .ods
|
||||
AddIcon /icons/odf6odp-20x22.png .odp
|
||||
AddIcon /icons/odf6odg-20x22.png .odg
|
||||
AddIcon /icons/odf6odc-20x22.png .odc
|
||||
AddIcon /icons/odf6odf-20x22.png .odf
|
||||
AddIcon /icons/odf6odb-20x22.png .odb
|
||||
AddIcon /icons/odf6odi-20x22.png .odi
|
||||
AddIcon /icons/odf6odm-20x22.png .odm
|
||||
|
||||
AddIcon /icons/odf6ott-20x22.png .ott
|
||||
AddIcon /icons/odf6ots-20x22.png .ots
|
||||
AddIcon /icons/odf6otp-20x22.png .otp
|
||||
AddIcon /icons/odf6otg-20x22.png .otg
|
||||
AddIcon /icons/odf6otc-20x22.png .otc
|
||||
AddIcon /icons/odf6otf-20x22.png .otf
|
||||
AddIcon /icons/odf6oti-20x22.png .oti
|
||||
AddIcon /icons/odf6oth-20x22.png .oth
|
||||
AddIcon /icons/odf6ott-20x22.png .ott
|
||||
AddIcon /icons/odf6ots-20x22.png .ots
|
||||
AddIcon /icons/odf6otp-20x22.png .otp
|
||||
AddIcon /icons/odf6otg-20x22.png .otg
|
||||
AddIcon /icons/odf6otc-20x22.png .otc
|
||||
AddIcon /icons/odf6otf-20x22.png .otf
|
||||
AddIcon /icons/odf6oti-20x22.png .oti
|
||||
AddIcon /icons/odf6oth-20x22.png .oth
|
||||
|
||||
#
|
||||
# DefaultIcon is which icon to show for files which do not have an icon
|
||||
# explicitly set.
|
||||
#
|
||||
DefaultIcon /icons/unknown.gif
|
||||
#
|
||||
# DefaultIcon is which icon to show for files which do not have an icon
|
||||
# explicitly set.
|
||||
#
|
||||
DefaultIcon /icons/unknown.gif
|
||||
|
||||
#
|
||||
# AddDescription allows you to place a short description after a file in
|
||||
# server-generated indexes. These are only displayed for FancyIndexed
|
||||
# directories.
|
||||
# Format: AddDescription "description" filename
|
||||
#
|
||||
#AddDescription "GZIP compressed document" .gz
|
||||
#AddDescription "tar archive" .tar
|
||||
#AddDescription "GZIP compressed tar archive" .tgz
|
||||
#
|
||||
# AddDescription allows you to place a short description after a file in
|
||||
# server-generated indexes. These are only displayed for FancyIndexed
|
||||
# directories.
|
||||
# Format: AddDescription "description" filename
|
||||
#
|
||||
#AddDescription "GZIP compressed document" .gz
|
||||
#AddDescription "tar archive" .tar
|
||||
#AddDescription "GZIP compressed tar archive" .tgz
|
||||
|
||||
#
|
||||
# ReadmeName is the name of the README file the server will look for by
|
||||
# default, and append to directory listings.
|
||||
#
|
||||
# HeaderName is the name of a file which should be prepended to
|
||||
# directory indexes.
|
||||
ReadmeName README.html
|
||||
HeaderName HEADER.html
|
||||
|
||||
#
|
||||
# IndexIgnore is a set of filenames which directory indexing should ignore
|
||||
# and not include in the listing. Shell-style wildcarding is permitted.
|
||||
#
|
||||
IndexIgnore .??* *~ *# RCS CVS *,v *,t
|
||||
#
|
||||
# ReadmeName is the name of the README file the server will look for by
|
||||
# default, and append to directory listings.
|
||||
#
|
||||
# HeaderName is the name of a file which should be prepended to
|
||||
# directory indexes.
|
||||
ReadmeName README.html
|
||||
HeaderName HEADER.html
|
||||
|
||||
#
|
||||
# IndexIgnore is a set of filenames which directory indexing should ignore
|
||||
# and not include in the listing. Shell-style wildcarding is permitted.
|
||||
#
|
||||
IndexIgnore .??* *~ *# RCS CVS *,v *,t
|
||||
</IfModule>
|
||||
|
@ -1,16 +1,16 @@
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE image/svg+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/atom_xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
AddOutputFilterByType DEFLATE application/x-httpd-php
|
||||
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
|
||||
AddOutputFilterByType DEFLATE application/x-httpd-eruby
|
||||
AddOutputFilterByType DEFLATE text/html
|
||||
AddOutputFilterByType DEFLATE text/css
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
AddOutputFilterByType DEFLATE text/xml
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml
|
||||
AddOutputFilterByType DEFLATE application/xml
|
||||
AddOutputFilterByType DEFLATE image/svg+xml
|
||||
AddOutputFilterByType DEFLATE application/rss+xml
|
||||
AddOutputFilterByType DEFLATE application/atom_xml
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE application/x-javascript
|
||||
AddOutputFilterByType DEFLATE application/x-httpd-php
|
||||
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
|
||||
AddOutputFilterByType DEFLATE application/x-httpd-eruby
|
||||
</IfModule>
|
||||
|
@ -1,5 +1,3 @@
|
||||
<IfModule mod_dir.c>
|
||||
|
||||
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
|
||||
|
||||
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
|
||||
</IfModule>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<IfModule mod_fastcgi.c>
|
||||
AddHandler fastcgi-script .fcgi
|
||||
#FastCgiWrapper /usr/lib/apache2/suexec
|
||||
FastCgiIpcDir /var/lib/apache2/fastcgi
|
||||
FastCgiIpcDir <%= "#{node['apache']['lib_dir']}/fastcgi" %>
|
||||
</IfModule>
|
||||
|
@ -3,7 +3,7 @@
|
||||
IPCConnectTimeout 20
|
||||
</IfModule>
|
||||
|
||||
<% if %w{ rhel fedora }.include?(node['platform_family']) -%>
|
||||
<% if %w[rhel fedora].include?(node['platform_family']) -%>
|
||||
# Sane place to put sockets and shared memory file
|
||||
SocketPath run/mod_fcgid
|
||||
SharememPath run/mod_fcgid/fcgid_shm
|
||||
|
14
chef/cookbooks/apache2/templates/default/mods/info.conf.erb
Normal file
14
chef/cookbooks/apache2/templates/default/mods/info.conf.erb
Normal file
@ -0,0 +1,14 @@
|
||||
<IfModule mod_info.c>
|
||||
#
|
||||
# Allow server info reports generated by mod_info,
|
||||
# with the URL of http://servername/server-info
|
||||
# Uncomment and change the ".example.com" to allow
|
||||
# access from other hosts.
|
||||
#
|
||||
<Location /server-info>
|
||||
SetHandler server-info
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from <%= node['apache']['info_allow_list'] %>
|
||||
</Location>
|
||||
</IfModule>
|
@ -1,198 +1,199 @@
|
||||
<IfModule mod_mime.c>
|
||||
#
|
||||
# TypesConfig points to the file containing the list of mappings from
|
||||
# filename extension to MIME-type.
|
||||
#
|
||||
<% case node['platform_family'] -%>
|
||||
<% when 'arch' -%>
|
||||
TypesConfig <%= node['apache']['dir'] %>/conf/mime.types
|
||||
<% when 'freebsd' -%>
|
||||
TypesConfig <%= node['apache']['dir'] %>/mime.types
|
||||
<% else -%>
|
||||
TypesConfig /etc/mime.types
|
||||
<% end -%>
|
||||
|
||||
#
|
||||
# TypesConfig points to the file containing the list of mappings from
|
||||
# filename extension to MIME-type.
|
||||
#
|
||||
<% case node['platform_family'] -%>
|
||||
<% when "arch" -%>
|
||||
TypesConfig <%= node['apache']['dir'] %>/conf/mime.types
|
||||
<% when "freebsd" -%>
|
||||
TypesConfig <%= node['apache']['dir'] %>/mime.types
|
||||
<% else -%>
|
||||
TypesConfig /etc/mime.types
|
||||
<% end -%>
|
||||
#
|
||||
# AddType allows you to add to or override the MIME configuration
|
||||
# file mime.types for specific file types.
|
||||
#
|
||||
#AddType application/x-gzip .tgz
|
||||
#
|
||||
# AddEncoding allows you to have certain browsers uncompress
|
||||
# information on the fly. Note: Not all browsers support this.
|
||||
# Despite the name similarity, the following Add* directives have
|
||||
# nothing to do with the FancyIndexing customization directives above.
|
||||
#
|
||||
#AddEncoding x-compress .Z
|
||||
#AddEncoding x-gzip .gz .tgz
|
||||
#AddEncoding x-bzip2 .bz2
|
||||
#
|
||||
# If the AddEncoding directives above are commented-out, then you
|
||||
# probably should define those extensions to indicate media types:
|
||||
#
|
||||
AddType application/x-compress .Z
|
||||
AddType application/x-gzip .gz .tgz
|
||||
AddType application/x-bzip2 .bz2
|
||||
|
||||
#
|
||||
# AddType allows you to add to or override the MIME configuration
|
||||
# file mime.types for specific file types.
|
||||
#
|
||||
#AddType application/x-gzip .tgz
|
||||
#
|
||||
# AddEncoding allows you to have certain browsers uncompress
|
||||
# information on the fly. Note: Not all browsers support this.
|
||||
# Despite the name similarity, the following Add* directives have
|
||||
# nothing to do with the FancyIndexing customization directives above.
|
||||
#
|
||||
#AddEncoding x-compress .Z
|
||||
#AddEncoding x-gzip .gz .tgz
|
||||
#AddEncoding x-bzip2 .bz2
|
||||
#
|
||||
# If the AddEncoding directives above are commented-out, then you
|
||||
# probably should define those extensions to indicate media types:
|
||||
#
|
||||
AddType application/x-compress .Z
|
||||
AddType application/x-gzip .gz .tgz
|
||||
AddType application/x-bzip2 .bz2
|
||||
AddType image/svg+xml svg svgz
|
||||
AddEncoding gzip svgz
|
||||
|
||||
#
|
||||
# DefaultLanguage and AddLanguage allows you to specify the language of
|
||||
# a document. You can then use content negotiation to give a browser a
|
||||
# file in a language the user can understand.
|
||||
#
|
||||
# Specify a default language. This means that all data
|
||||
# going out without a specific language tag (see below) will
|
||||
# be marked with this one. You probably do NOT want to set
|
||||
# this unless you are sure it is correct for all cases.
|
||||
#
|
||||
# * It is generally better to not mark a page as
|
||||
# * being a certain language than marking it with the wrong
|
||||
# * language!
|
||||
#
|
||||
# DefaultLanguage nl
|
||||
#
|
||||
# Note 1: The suffix does not have to be the same as the language
|
||||
# keyword --- those with documents in Polish (whose net-standard
|
||||
# language code is pl) may wish to use "AddLanguage pl .po" to
|
||||
# avoid the ambiguity with the common suffix for perl scripts.
|
||||
#
|
||||
# Note 2: The example entries below illustrate that in some cases
|
||||
# the two character 'Language' abbreviation is not identical to
|
||||
# the two character 'Country' code for its country,
|
||||
# E.g. 'Danmark/dk' versus 'Danish/da'.
|
||||
#
|
||||
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
|
||||
# specifier. There is 'work in progress' to fix this and get
|
||||
# the reference data for rfc1766 cleaned up.
|
||||
#
|
||||
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
|
||||
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
|
||||
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
|
||||
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
|
||||
# Norwegian (no) - Polish (pl) - Portugese (pt)
|
||||
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
|
||||
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
|
||||
#
|
||||
AddLanguage ca .ca
|
||||
AddLanguage cs .cz .cs
|
||||
AddLanguage da .dk
|
||||
AddLanguage de .de
|
||||
AddLanguage el .el
|
||||
AddLanguage en .en
|
||||
AddLanguage eo .eo
|
||||
# See README.Debian for Spanish
|
||||
AddLanguage es .es
|
||||
AddLanguage et .et
|
||||
AddLanguage fr .fr
|
||||
AddLanguage he .he
|
||||
AddLanguage hr .hr
|
||||
AddLanguage it .it
|
||||
AddLanguage ja .ja
|
||||
AddLanguage ko .ko
|
||||
AddLanguage ltz .ltz
|
||||
AddLanguage nl .nl
|
||||
AddLanguage nn .nn
|
||||
AddLanguage no .no
|
||||
AddLanguage pl .po
|
||||
AddLanguage pt .pt
|
||||
AddLanguage pt-BR .pt-br
|
||||
AddLanguage ru .ru
|
||||
AddLanguage sv .sv
|
||||
# See README.Debian for Turkish
|
||||
AddLanguage tr .tr
|
||||
AddLanguage zh-CN .zh-cn
|
||||
AddLanguage zh-TW .zh-tw
|
||||
#
|
||||
# DefaultLanguage and AddLanguage allows you to specify the language of
|
||||
# a document. You can then use content negotiation to give a browser a
|
||||
# file in a language the user can understand.
|
||||
#
|
||||
# Specify a default language. This means that all data
|
||||
# going out without a specific language tag (see below) will
|
||||
# be marked with this one. You probably do NOT want to set
|
||||
# this unless you are sure it is correct for all cases.
|
||||
#
|
||||
# * It is generally better to not mark a page as
|
||||
# * being a certain language than marking it with the wrong
|
||||
# * language!
|
||||
#
|
||||
# DefaultLanguage nl
|
||||
#
|
||||
# Note 1: The suffix does not have to be the same as the language
|
||||
# keyword --- those with documents in Polish (whose net-standard
|
||||
# language code is pl) may wish to use "AddLanguage pl .po" to
|
||||
# avoid the ambiguity with the common suffix for perl scripts.
|
||||
#
|
||||
# Note 2: The example entries below illustrate that in some cases
|
||||
# the two character 'Language' abbreviation is not identical to
|
||||
# the two character 'Country' code for its country,
|
||||
# E.g. 'Danmark/dk' versus 'Danish/da'.
|
||||
#
|
||||
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
|
||||
# specifier. There is 'work in progress' to fix this and get
|
||||
# the reference data for rfc1766 cleaned up.
|
||||
#
|
||||
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
|
||||
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
|
||||
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
|
||||
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
|
||||
# Norwegian (no) - Polish (pl) - Portugese (pt)
|
||||
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
|
||||
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
|
||||
#
|
||||
AddLanguage ca .ca
|
||||
AddLanguage cs .cz .cs
|
||||
AddLanguage da .dk
|
||||
AddLanguage de .de
|
||||
AddLanguage el .el
|
||||
AddLanguage en .en
|
||||
AddLanguage eo .eo
|
||||
# See README.Debian for Spanish
|
||||
AddLanguage es .es
|
||||
AddLanguage et .et
|
||||
AddLanguage fr .fr
|
||||
AddLanguage he .he
|
||||
AddLanguage hr .hr
|
||||
AddLanguage it .it
|
||||
AddLanguage ja .ja
|
||||
AddLanguage ko .ko
|
||||
AddLanguage ltz .ltz
|
||||
AddLanguage nl .nl
|
||||
AddLanguage nn .nn
|
||||
AddLanguage no .no
|
||||
AddLanguage pl .po
|
||||
AddLanguage pt .pt
|
||||
AddLanguage pt-BR .pt-br
|
||||
AddLanguage ru .ru
|
||||
AddLanguage sv .sv
|
||||
# See README.Debian for Turkish
|
||||
AddLanguage tr .tr
|
||||
AddLanguage zh-CN .zh-cn
|
||||
AddLanguage zh-TW .zh-tw
|
||||
|
||||
#
|
||||
# Commonly used filename extensions to character sets. You probably
|
||||
# want to avoid clashes with the language extensions, unless you
|
||||
# are good at carefully testing your setup after each change.
|
||||
# See http://www.iana.org/assignments/character-sets for the
|
||||
# official list of charset names and their respective RFCs.
|
||||
#
|
||||
AddCharset us-ascii .ascii .us-ascii
|
||||
AddCharset ISO-8859-1 .iso8859-1 .latin1
|
||||
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
|
||||
AddCharset ISO-8859-3 .iso8859-3 .latin3
|
||||
AddCharset ISO-8859-4 .iso8859-4 .latin4
|
||||
AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru
|
||||
AddCharset ISO-8859-6 .iso8859-6 .arb .arabic
|
||||
AddCharset ISO-8859-7 .iso8859-7 .grk .greek
|
||||
AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew
|
||||
AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk
|
||||
AddCharset ISO-8859-10 .iso8859-10 .latin6
|
||||
AddCharset ISO-8859-13 .iso8859-13
|
||||
AddCharset ISO-8859-14 .iso8859-14 .latin8
|
||||
AddCharset ISO-8859-15 .iso8859-15 .latin9
|
||||
AddCharset ISO-8859-16 .iso8859-16 .latin10
|
||||
AddCharset ISO-2022-JP .iso2022-jp .jis
|
||||
AddCharset ISO-2022-KR .iso2022-kr .kis
|
||||
AddCharset ISO-2022-CN .iso2022-cn .cis
|
||||
AddCharset Big5 .Big5 .big5 .b5
|
||||
AddCharset cn-Big5 .cn-big5
|
||||
# For russian, more than one charset is used (depends on client, mostly):
|
||||
AddCharset WINDOWS-1251 .cp-1251 .win-1251
|
||||
AddCharset CP866 .cp866
|
||||
AddCharset KOI8 .koi8
|
||||
AddCharset KOI8-E .koi8-e
|
||||
AddCharset KOI8-r .koi8-r .koi8-ru
|
||||
AddCharset KOI8-U .koi8-u
|
||||
AddCharset KOI8-ru .koi8-uk .ua
|
||||
AddCharset ISO-10646-UCS-2 .ucs2
|
||||
AddCharset ISO-10646-UCS-4 .ucs4
|
||||
AddCharset UTF-7 .utf7
|
||||
AddCharset UTF-8 .utf8
|
||||
AddCharset UTF-16 .utf16
|
||||
AddCharset UTF-16BE .utf16be
|
||||
AddCharset UTF-16LE .utf16le
|
||||
AddCharset UTF-32 .utf32
|
||||
AddCharset UTF-32BE .utf32be
|
||||
AddCharset UTF-32LE .utf32le
|
||||
AddCharset euc-cn .euc-cn
|
||||
AddCharset euc-gb .euc-gb
|
||||
AddCharset euc-jp .euc-jp
|
||||
AddCharset euc-kr .euc-kr
|
||||
#Not sure how euc-tw got in - IANA doesn't list it???
|
||||
AddCharset EUC-TW .euc-tw
|
||||
AddCharset gb2312 .gb2312 .gb
|
||||
AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
|
||||
AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
|
||||
AddCharset shift_jis .shift_jis .sjis
|
||||
#
|
||||
# Commonly used filename extensions to character sets. You probably
|
||||
# want to avoid clashes with the language extensions, unless you
|
||||
# are good at carefully testing your setup after each change.
|
||||
# See http://www.iana.org/assignments/character-sets for the
|
||||
# official list of charset names and their respective RFCs.
|
||||
#
|
||||
AddCharset us-ascii .ascii .us-ascii
|
||||
AddCharset ISO-8859-1 .iso8859-1 .latin1
|
||||
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
|
||||
AddCharset ISO-8859-3 .iso8859-3 .latin3
|
||||
AddCharset ISO-8859-4 .iso8859-4 .latin4
|
||||
AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru
|
||||
AddCharset ISO-8859-6 .iso8859-6 .arb .arabic
|
||||
AddCharset ISO-8859-7 .iso8859-7 .grk .greek
|
||||
AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew
|
||||
AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk
|
||||
AddCharset ISO-8859-10 .iso8859-10 .latin6
|
||||
AddCharset ISO-8859-13 .iso8859-13
|
||||
AddCharset ISO-8859-14 .iso8859-14 .latin8
|
||||
AddCharset ISO-8859-15 .iso8859-15 .latin9
|
||||
AddCharset ISO-8859-16 .iso8859-16 .latin10
|
||||
AddCharset ISO-2022-JP .iso2022-jp .jis
|
||||
AddCharset ISO-2022-KR .iso2022-kr .kis
|
||||
AddCharset ISO-2022-CN .iso2022-cn .cis
|
||||
AddCharset Big5 .Big5 .big5 .b5
|
||||
AddCharset cn-Big5 .cn-big5
|
||||
# For russian, more than one charset is used (depends on client, mostly):
|
||||
AddCharset WINDOWS-1251 .cp-1251 .win-1251
|
||||
AddCharset CP866 .cp866
|
||||
AddCharset KOI8 .koi8
|
||||
AddCharset KOI8-E .koi8-e
|
||||
AddCharset KOI8-r .koi8-r .koi8-ru
|
||||
AddCharset KOI8-U .koi8-u
|
||||
AddCharset KOI8-ru .koi8-uk .ua
|
||||
AddCharset ISO-10646-UCS-2 .ucs2
|
||||
AddCharset ISO-10646-UCS-4 .ucs4
|
||||
AddCharset UTF-7 .utf7
|
||||
AddCharset UTF-8 .utf8
|
||||
AddCharset UTF-16 .utf16
|
||||
AddCharset UTF-16BE .utf16be
|
||||
AddCharset UTF-16LE .utf16le
|
||||
AddCharset UTF-32 .utf32
|
||||
AddCharset UTF-32BE .utf32be
|
||||
AddCharset UTF-32LE .utf32le
|
||||
AddCharset euc-cn .euc-cn
|
||||
AddCharset euc-gb .euc-gb
|
||||
AddCharset euc-jp .euc-jp
|
||||
AddCharset euc-kr .euc-kr
|
||||
#Not sure how euc-tw got in - IANA doesn't list it???
|
||||
AddCharset EUC-TW .euc-tw
|
||||
AddCharset gb2312 .gb2312 .gb
|
||||
AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
|
||||
AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
|
||||
AddCharset shift_jis .shift_jis .sjis
|
||||
|
||||
#
|
||||
# AddHandler allows you to map certain file extensions to "handlers":
|
||||
# actions unrelated to filetype. These can be either built into the server
|
||||
# or added with the Action directive (see below)
|
||||
#
|
||||
# To use CGI scripts outside of ScriptAliased directories:
|
||||
# (You will also need to add "ExecCGI" to the "Options" directive.)
|
||||
#
|
||||
#AddHandler cgi-script .cgi
|
||||
#
|
||||
# AddHandler allows you to map certain file extensions to "handlers":
|
||||
# actions unrelated to filetype. These can be either built into the server
|
||||
# or added with the Action directive (see below)
|
||||
#
|
||||
# To use CGI scripts outside of ScriptAliased directories:
|
||||
# (You will also need to add "ExecCGI" to the "Options" directive.)
|
||||
#
|
||||
#AddHandler cgi-script .cgi
|
||||
|
||||
#
|
||||
# For files that include their own HTTP headers:
|
||||
#
|
||||
#AddHandler send-as-is asis
|
||||
#
|
||||
# For files that include their own HTTP headers:
|
||||
#
|
||||
#AddHandler send-as-is asis
|
||||
|
||||
#
|
||||
# For server-parsed imagemap files:
|
||||
#
|
||||
#AddHandler imap-file map
|
||||
#
|
||||
# For server-parsed imagemap files:
|
||||
#
|
||||
#AddHandler imap-file map
|
||||
|
||||
#
|
||||
# For type maps (negotiated resources):
|
||||
# (This is enabled by default to allow the Apache "It Worked" page
|
||||
# to be distributed in multiple languages.)
|
||||
#
|
||||
AddHandler type-map var
|
||||
|
||||
#
|
||||
# Filters allow you to process content before it is sent to the client.
|
||||
#
|
||||
# To parse .shtml files for server-side includes (SSI):
|
||||
# (You will also need to add "Includes" to the "Options" directive.)
|
||||
#
|
||||
AddType text/html .shtml
|
||||
AddOutputFilter INCLUDES .shtml
|
||||
#
|
||||
# For type maps (negotiated resources):
|
||||
# (This is enabled by default to allow the Apache "It Worked" page
|
||||
# to be distributed in multiple languages.)
|
||||
#
|
||||
AddHandler type-map var
|
||||
|
||||
#
|
||||
# Filters allow you to process content before it is sent to the client.
|
||||
#
|
||||
# To parse .shtml files for server-side includes (SSI):
|
||||
# (You will also need to add "Includes" to the "Options" directive.)
|
||||
#
|
||||
AddType text/html .shtml
|
||||
AddOutputFilter INCLUDES .shtml
|
||||
</IfModule>
|
||||
|
@ -1,18 +1,17 @@
|
||||
<IfModule mod_negotiation.c>
|
||||
#
|
||||
# LanguagePriority allows you to give precedence to some languages
|
||||
# in case of a tie during content negotiation.
|
||||
#
|
||||
# Just list the languages in decreasing order of preference. We have
|
||||
# more or less alphabetized them here. You probably want to change this.
|
||||
#
|
||||
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW
|
||||
|
||||
#
|
||||
# ForceLanguagePriority allows you to serve a result page rather than
|
||||
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
|
||||
# [in case no accepted languages matched the available variants]
|
||||
#
|
||||
ForceLanguagePriority Prefer Fallback
|
||||
#
|
||||
# LanguagePriority allows you to give precedence to some languages
|
||||
# in case of a tie during content negotiation.
|
||||
#
|
||||
# Just list the languages in decreasing order of preference. We have
|
||||
# more or less alphabetized them here. You probably want to change this.
|
||||
#
|
||||
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW
|
||||
|
||||
#
|
||||
# ForceLanguagePriority allows you to serve a result page rather than
|
||||
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
|
||||
# [in case no accepted languages matched the available variants]
|
||||
#
|
||||
ForceLanguagePriority Prefer Fallback
|
||||
</IfModule>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user