Installs nginx from package OR source code and sets up configuration handling similar to Debian's Apache2 scripts.
- [COOK-809] - attribute to disable access logging
- [COOK-772] - update nginx download source location
- build-essential (for nginx::source)
- runit (for nginx::source)
Debian or Ubuntu though may work where 'build-essential' works, but other platforms are untested.
All node attributes are set under the
- version - sets the version to install.
- dir - configuration dir.
log_dir- where logs go.
- user - user to run as.
- binary - path to nginx binary.
- gzip - all attributes under the
gzipnamespace configure the gzip module.
- keepalive - whether to use keepalive.
keepalive_timeout- set the keepalive timeout.
worker_processes- number of workers to spawn.
worker_connections- number of connections per worker.
The following attributes are set at the 'normal' node level via the
install_path- for nginx::source, sets the --prefix installation.
src_binary- for nginx::source, sets the binary location.
configure_flags- for nginx::source, an array of flags to use for compilation.
Provides two ways to install and configure nginx.
- Install via native package (nginx::default)
- Install via compiled source (nginx::source)
Both recipes implement configuration handling similar to the Debian Apache2 site enable/disable.
There's some redundancy in that the config handling hasn't been separated from the installation method (yet), so use only one of the recipes.
Some of the attributes mentioned above are only set in the
nginx::source recipe. They can be overridden by setting them via a role in
License and Author
Copyright:: 2008-2011, 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
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.