Comments (3)
My bad, I've just realized that I did not include the template
parameter. Maybe it'd be good to set it to default-site.erb
as default? :)
To better clarify it:
This works:
nginx_site 'test_site' do
template 'default-site.erb'
variables(
'port': 80,
'server_name': 'test_site',
'default_root': '/var/www/nginx-default',
'nginx_log_dir': '/var/log/nginx'
)
action :create
owner 'root'
mode '777'
notifies :reload, 'nginx_service[nginx]', :delayed
end
This doesn't:
nginx_site 'test_site' do
variables(
'port': 80,
'server_name': 'test_site',
'default_root': '/var/www/nginx-default',
'nginx_log_dir': '/var/log/nginx'
)
action :create
owner 'root'
mode '777'
notifies :reload, 'nginx_service[nginx]', :delayed
end
Anyway, feel free to close this issue.
from nginx.
Ok just had a quite look and it seems that the docs are wrong, I'll get an update in. You'll have to reference the default site-template in the mean time to get the correct hash keys.
The expectation was that people would override the template used for their use case so the default template is very loose, looks like that example resource was carried over from < v11 and was missed.
The default template is centered around nested hashes for upstream
, server
and map
so configuration entries need to be under those.
from nginx.
My bad, I've just realized that I did not include the
template
parameter. Maybe it'd be good to set it todefault-site.erb
as default? :)Anyway, feel free to close this issue.
The template property does default to default-site.erb
.
from nginx.
Related Issues (20)
- Purpose of the log resource on install HOT 2
- Follow up for logging issue #538 HOT 2
- Validating nginx configs to prevent sites from going down on reload of bad config HOT 5
- Option to specify nginx version using resource-based install HOT 2
- Parent directory /etc/nginx/conf.http.d does not exist since recent update HOT 13
- Configurable file/directory mode HOT 1
- Incorrect permissions of nginx config files HOT 5
- Documentation / nginx_site makes reference to syslog-ng
- nginx Chef 17 Compatibility
- `options` key has to be present if `upstream` is used in nginx_site HOT 2
- nginx_site `template` attribute isn't very useful HOT 4
- Insecure default owner/group for files and folders created by nginx_config & nginx_site on Debian based platforms
- Repo helper shouldn't assume SLES 12
- NGINX install HOT 1
- Add support for basic authorization
- NoMethodError - undefined method `pidfile_location' for Chef::Resource::Directory HOT 1
- The changes in #593 make nginx run as root by default without privilege separation on platform family debian
- Dependency Dashboard
- Extract useful methods to outside of action_class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx.