provizioning 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/provizioning/version.rb
CHANGED
@@ -46,7 +46,7 @@ class nginx::fcgi inherits nginx {
|
|
46
46
|
# fastcgi_pass => "127.0.0.1:9000",
|
47
47
|
# server_name => "$fqdn",
|
48
48
|
# }
|
49
|
-
define site ( $ensure = 'present', $index = 'index.php', $root, $fastcgi_pass, $include = '', $listen = '80', $server_name = '', $access_log = '', $ssl_certificate = '', $ssl_certificate_key = '', $ssl_session_timeout = '5m') {
|
49
|
+
define site ( $ensure = 'present', $index = 'index.php', $root, $fastcgi_pass, $include = '', $listen = '80', $server_name = '', $access_log = '', $error_log = '', $ssl_certificate = '', $ssl_certificate_key = '', $ssl_session_timeout = '5m') {
|
50
50
|
|
51
51
|
$real_server_name = $server_name ? {
|
52
52
|
'' => "${name}",
|
@@ -58,6 +58,12 @@ class nginx::fcgi inherits nginx {
|
|
58
58
|
default => $access_log,
|
59
59
|
}
|
60
60
|
|
61
|
+
$real_error_log = $error_log ? {
|
62
|
+
'' => "/var/log/nginx/${name}_error.log",
|
63
|
+
default => $error_log,
|
64
|
+
}
|
65
|
+
|
66
|
+
|
61
67
|
#Autogenerating ssl certs
|
62
68
|
if $listen == '443' and $ensure == 'present' and ( $ssl_certificate == '' or $ssl_certificate_key == '') {
|
63
69
|
exec {"generate-${name}-certs":
|
@@ -0,0 +1,66 @@
|
|
1
|
+
server {
|
2
|
+
server_name <% real_server_name.each do |s_n| -%><%= s_n %> <% end -%>;
|
3
|
+
access_log <%= real_access_log %>;
|
4
|
+
error_log <%= real_error_log %>;
|
5
|
+
root <%= root %>;
|
6
|
+
|
7
|
+
client_max_body_size 50M;
|
8
|
+
client_body_buffer_size 128k;
|
9
|
+
|
10
|
+
location = /favicon.ico {
|
11
|
+
log_not_found off;
|
12
|
+
access_log off;
|
13
|
+
}
|
14
|
+
|
15
|
+
location = /robots.txt {
|
16
|
+
allow all;
|
17
|
+
log_not_found off;
|
18
|
+
access_log off;
|
19
|
+
}
|
20
|
+
|
21
|
+
# This matters if you use drush
|
22
|
+
location = /backup {
|
23
|
+
deny all;
|
24
|
+
}
|
25
|
+
|
26
|
+
# Very rarely should these ever be accessed outside of your LAN
|
27
|
+
location ~* \.(txt|log)$ {
|
28
|
+
allow 10.0.0.0/8;
|
29
|
+
allow 172.16.0.0/12;
|
30
|
+
allow 192.168.0.0/16;
|
31
|
+
deny all;
|
32
|
+
}
|
33
|
+
|
34
|
+
location ~ \..*/.*\.php$ {
|
35
|
+
return 403;
|
36
|
+
}
|
37
|
+
|
38
|
+
location / {
|
39
|
+
# This is cool because no php is touched for static content
|
40
|
+
try_files $uri @rewrite;
|
41
|
+
}
|
42
|
+
|
43
|
+
location @rewrite {
|
44
|
+
# Some modules enforce no slash (/) at the end of the URL
|
45
|
+
# Else this rewrite block wouldn't be needed (GlobalRedirect)
|
46
|
+
rewrite ^/(.*)$ /index.php?q=$1;
|
47
|
+
|
48
|
+
location ~ \.php$ {
|
49
|
+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
50
|
+
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
|
51
|
+
include /etc/nginx/fastcgi_params;
|
52
|
+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
53
|
+
fastcgi_intercept_errors on;
|
54
|
+
fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket;
|
55
|
+
}
|
56
|
+
|
57
|
+
# Fighting with ImageCache? This little gem is amazing.
|
58
|
+
location ~ ^/sites/.*/files/styles/ {
|
59
|
+
try_files $uri @rewrite;
|
60
|
+
}
|
61
|
+
|
62
|
+
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
63
|
+
expires max;
|
64
|
+
log_not_found off;
|
65
|
+
}
|
66
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: provizioning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
16
|
-
requirement: &
|
16
|
+
requirement: &70093075523280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70093075523280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: capistrano-ext
|
27
|
-
requirement: &
|
27
|
+
requirement: &70093075522760 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70093075522760
|
36
36
|
description: Puppet server provisioning tools, recipes and templates
|
37
37
|
email:
|
38
38
|
- victor.castell@season.es
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- puppet/modules/network/manifests/init.pp
|
176
176
|
- puppet/modules/nginx/manifests/fcgi.pp
|
177
177
|
- puppet/modules/nginx/manifests/init.pp
|
178
|
+
- puppet/modules/nginx/templates/fcgi_drupal_site.erb
|
178
179
|
- puppet/modules/nginx/templates/fcgi_site.erb
|
179
180
|
- puppet/modules/nginx/templates/includes/fastcgi_params.erb
|
180
181
|
- puppet/modules/nginx/templates/nginx.conf.erb
|