Commit 77730dfede7fb2c19c1fc9545059a44712272d72
1 parent
677ccf51
Exists in
master
and in
90 other branches
Added nginx permission to write files *.error.log
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
Showing
2 changed files
with
23 additions
and
0 deletions
Show diff stats
cookbooks/basics/recipes/nginx.rb
@@ -4,3 +4,15 @@ service 'nginx' do | @@ -4,3 +4,15 @@ service 'nginx' do | ||
4 | action :enable | 4 | action :enable |
5 | supports :restart => true | 5 | supports :restart => true |
6 | end | 6 | end |
7 | + | ||
8 | +################################ | ||
9 | +# SELinux: allow nginx to use log files | ||
10 | +################################ | ||
11 | +cookbook_file '/etc/selinux/local/nginx.te' do | ||
12 | + notifies :run, 'execute[selinux-nginx]' | ||
13 | +end | ||
14 | + | ||
15 | +execute 'selinux-nginx' do | ||
16 | + command 'selinux-install-module /etc/selinux/local/nginx.te' | ||
17 | + action :nothing | ||
18 | +end |