Configures nginx
- CentOS 6.5
Key | Type | Default | Description |
---|---|---|---|
servers |
Hash | {} |
A list of servers with names as key |
Key | Type | Default | Description |
---|---|---|---|
port |
Integer | 80 |
The port to listen on |
root |
String | nil |
The server's document root |
enable |
Boolean | true |
Enable or disable the server |
upstreams |
Hash | {} |
A list of upstreams with names as key |
locations |
Array | [] |
A list of locations definitions |
params |
Hash | {} |
A list of extra parameters for server context |
Key | Type | Default | Description |
---|---|---|---|
ip |
String | nil |
The IP of the upstream server |
port |
Integer | 80 |
The port of the upstream server |
Key | Type | Default | Description |
---|---|---|---|
path |
String | nil |
The location path |
alias |
String | nil |
The location alias |
upstream |
String | nil |
Name of an existing upstream |
params |
Hash | {} |
A list of extra parameters for location context |
Include nginx-config
in your node's run_list
:
{
"run_list": [
"recipe[nginx-config]"
]
}
This recipe will let you disable server configurations. Every server marked with enable => false
will be disabled (i.e. configuration file or symlink deleted):
{
"run_list": [
"recipe[nginx-config]",
"recipe[nginx-config::clean]"
]
}