diff --git a/metadata.rb b/metadata.rb index 3172552..fad1dd0 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email 'you@example.com' license 'All Rights Reserved' description 'Installs/Configures t42-common' long_description 'Installs/Configures t42-common' -version '0.1.5' +version '0.1.6' chef_version '>= 13.0' depends 'nodejs' diff --git a/recipes/php.rb b/recipes/php.rb index ebb0e80..30c56ae 100644 --- a/recipes/php.rb +++ b/recipes/php.rb @@ -4,3 +4,7 @@ ].each do |pkg| apt_package pkg end + +systemd_unit 'apache2.service' do + action :restart +end diff --git a/templates/apache/vhost.conf.erb b/templates/apache/vhost.conf.erb index bab179c..10fcf66 100644 --- a/templates/apache/vhost.conf.erb +++ b/templates/apache/vhost.conf.erb @@ -41,13 +41,22 @@ + <% if node['web']['root'] %> + DocumentRoot <%= node['web']['root'] %> + /> + Options Indexes FollowSymLinks + AllowOverride None + Require all granted + + <% end - %> + <% if node['web']['static'] %> <% node['web']['static'].each do |static| -%> Alias <%= static['uri'] %> <%= node['working-dir'] %>/<%= static['path'] %> <% end -%> <% end -%> - + <% if node['web']['wsgi'] %> WSGIDaemonProcess <%= node['app']['name'] %> python-path=<%= node['python']['working-dir'] %> python-home=<%= node['python']['env_path'] %>