diff options
-rw-r--r-- | manifests/centos.pp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/manifests/centos.pp b/manifests/centos.pp index 7f8ba94..7afb69d 100644 --- a/manifests/centos.pp +++ b/manifests/centos.pp @@ -29,13 +29,17 @@ class apache::centos inherits apache::package { } if $::selinux != 'false' { + Selinux::Fcontext{ + before => File[web_dir], + } selinux::fcontext{ - ['/var/www/vhosts/.+/www(/.*)?', - '/var/www/vhosts/.+/non_public(/.*)?', - '/var/www/vhosts/.+/g2data(/.*)?', - '/var/www/vhosts/.+/upload(/.*)?' ]: - setype => 'httpd_sys_script_rw_t', - before => File[web_dir]; + [ '/var/www/vhosts/.+/www(/.*)?', + '/var/www/vhosts/.+/non_public(/.*)?', + '/var/www/vhosts/.+/g2data(/.*)?', + '/var/www/vhosts/.+/upload(/.*)?' ]: + setype => 'httpd_sys_script_rw_t'; + '/var/www/vhosts/.*/logs(/.*)?': + setpye => 'httpd_log_t'; } } file{'apache_service_config': |