diff --git a/apache/files/FreeBSD/apache-2.4.config.jinja b/apache/files/FreeBSD/apache-2.4.config.jinja index 5c0100c..024945c 100644 --- a/apache/files/FreeBSD/apache-2.4.config.jinja +++ b/apache/files/FreeBSD/apache-2.4.config.jinja @@ -1,3 +1,7 @@ +# +# This file is managed by Salt! Do not edit by hand! +# + # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. diff --git a/apache/osfamilymap.yaml b/apache/osfamilymap.yaml index 42497d6..e8d0d35 100644 --- a/apache/osfamilymap.yaml +++ b/apache/osfamilymap.yaml @@ -202,7 +202,9 @@ FreeBSD: confext: '' default_site: default default_site_ssl: default-ssl + moddir: /usr/local/etc/apache24/modules.d logdir: /var/log/ + logrotatedir: /usr/local/etc/logrotate.d/apache2 wwwdir: /usr/local/www/apache24/ OpenBSD: diff --git a/test/integration/default/controls/config_spec.rb b/test/integration/default/controls/config_spec.rb index 5847900..e9f0f18 100644 --- a/test/integration/default/controls/config_spec.rb +++ b/test/integration/default/controls/config_spec.rb @@ -28,9 +28,11 @@ control 'apache configuration' do sitesdir = '/etc/httpd/sites-enabled' when 'bsd' vhostdir = '/usr/local/etc/apache24/Includes' - # logrotatedir = ? - # moddir = '?' - # sitesdir = '?' + logrotatedir = '/usr/local/etc/logrotate.d/apache2' + moddir = '/usr/local/etc/apache24/modules.d' + # https://docs.freebsd.org/en/books/handbook/network-servers/#_virtual_hosting + # All done under `/usr/local/etc/apache24/httpd.conf` + sitesdir = '/usr/local/etc/apache24' end describe file(vhostdir) do it { should exist } @@ -56,6 +58,7 @@ end control 'apache configuration (unique)' do title 'should be valid' + config_file_group = 'root' case platform[:family] when 'debian' config_file = '/etc/apache2/apache2.conf' @@ -74,11 +77,12 @@ control 'apache configuration (unique)' do wwwdir = '/srv/http' when 'bsd' config_file = '/usr/local/etc/apache24/httpd.conf' + config_file_group = 'wheel' wwwdir = '/usr/local/www/apache24/' end describe file(config_file) do it { should be_file } - it { should be_grouped_into 'root' } + it { should be_grouped_into config_file_group } its('mode') { should cmp '0644' } its('content') do should include(