benoitcattie / puppet-nginx Goto Github PK
View Code? Open in Web Editor NEWBasic module for configuring nginx via puppet
License: Other
Basic module for configuring nginx via puppet
License: Other
In manifests/init.pp you have a path of '/usr/bin' when you call 'ln' to create the symlink. Under Ubuntu, that file is in '/bin' so the command fails. The following will fix it:
path => ["/usr/bin/", "/bin"],
As it stands, the configs your module generates exhibit the problem described here:
In brief, any file in the server's web space can be executed as php. Ie there's any sort of file uploads by users it becomes dangerous. eg user uploads "picture.gif", which is in fact a php file, and then addresses it as "path/picture.gif/foo.php".
Easily fixed with a test for file existence.
I'd like to be able to do:
file{ '/etc/nginx/sites-enabled':
ensure => directory,
recurse => true,
purge => true,
}
This fails because the symlinks in this directory are created with an exec instead of a file resource. (at the end of manifests/install_site.pp)
I'm not sure why you've done it this way. Couldn't a file resource be used to create the symlinks?
It would be cleaner if the purging of the sites-enabled directory was done by the nginx module, presumably depending on some parameter being set to trigger this behaviour.
templates/fcgi_site.erb
expects to be able to iterate on string variables with each
. In Ruby 1.8, this iterated over lines. That's deprecated by Ruby 1.9.
Specifically, templates/fcgi_site.erb
tries to iterate on real_server_name
and include
.
$ puppet-module install BenoitCattie/nginx
Could not parse filename to obtain the username, module name and version. (BenoitCattie-nginx-0.2)
$ ls
(nothing installed)
using puppet-module-0.3.4
When I attempt to use this module in a new CentOS 5.5 box (virtualized, managed using Vagrant) I get the following error:
[default] Duplicate definition: File[undef] is already defined in file /tmp/vagrant-puppet/modules-0/nginx/manifests/init.pp at line 56; cannot redefine at /tmp/vagrant-puppet/modules-0/nginx/manifests/init.pp:72 on node centos5.vagrant.internal
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.