|
|
|
|
|
|
|
|
sitesdir = '/etc/httpd/sites-enabled' |
|
|
sitesdir = '/etc/httpd/sites-enabled' |
|
|
when 'bsd' |
|
|
when 'bsd' |
|
|
vhostdir = '/usr/local/etc/apache24/Includes' |
|
|
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 |
|
|
end |
|
|
describe file(vhostdir) do |
|
|
describe file(vhostdir) do |
|
|
it { should exist } |
|
|
it { should exist } |
|
|
|
|
|
|
|
|
control 'apache configuration (unique)' do |
|
|
control 'apache configuration (unique)' do |
|
|
title 'should be valid' |
|
|
title 'should be valid' |
|
|
|
|
|
|
|
|
|
|
|
config_file_group = 'root' |
|
|
case platform[:family] |
|
|
case platform[:family] |
|
|
when 'debian' |
|
|
when 'debian' |
|
|
config_file = '/etc/apache2/apache2.conf' |
|
|
config_file = '/etc/apache2/apache2.conf' |
|
|
|
|
|
|
|
|
wwwdir = '/srv/http' |
|
|
wwwdir = '/srv/http' |
|
|
when 'bsd' |
|
|
when 'bsd' |
|
|
config_file = '/usr/local/etc/apache24/httpd.conf' |
|
|
config_file = '/usr/local/etc/apache24/httpd.conf' |
|
|
|
|
|
config_file_group = 'wheel' |
|
|
wwwdir = '/usr/local/www/apache24/' |
|
|
wwwdir = '/usr/local/www/apache24/' |
|
|
end |
|
|
end |
|
|
describe file(config_file) do |
|
|
describe file(config_file) do |
|
|
it { should be_file } |
|
|
it { should be_file } |
|
|
it { should be_grouped_into 'root' } |
|
|
|
|
|
|
|
|
it { should be_grouped_into config_file_group } |
|
|
its('mode') { should cmp '0644' } |
|
|
its('mode') { should cmp '0644' } |
|
|
its('content') do |
|
|
its('content') do |
|
|
should include( |
|
|
should include( |