From dfd824e4950e4064aae83e42bc2397e3a3f2416d Mon Sep 17 00:00:00 2001 From: William Mantly Date: Sun, 30 Jun 2019 22:53:06 -0400 Subject: [PATCH 1/2] Added document root for acpache --- templates/apache/vhost.conf.erb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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'] %> From 7444f88bc50fbbc7418b3e664fc85010795bb100 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Sun, 30 Jun 2019 23:30:40 -0400 Subject: [PATCH 2/2] restart apache for PHP --- metadata.rb | 2 +- recipes/php.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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